Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Ref #646
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott J. Miles committed Jul 19, 2014
1 parent 8f8ecc1 commit 43fe8b9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/instance/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@
* @param {string} type An event name.
* @param {any} detail
* @param {Node} onNode Target node.
* @param {Boolean} bubbles Set false to prevent bubbling, defaults to true
* @param {Boolean} cancelable Set false to prevent cancellation, defaults to true
*/
fire: function(type, detail, onNode, bubbles, cancelable) {
var node = onNode || this;
var detail = detail || {};
var detail = detail === null || detail === undefined ? {} : detail;
var event = new CustomEvent(type, {
bubbles: (bubbles !== undefined ? bubbles : true),
cancelable: (cancelable !== undefined ? cancelable : true),
bubbles: bubbles !== undefined ? bubbles : true,
cancelable: cancelable !== undefined ? cancelable : true,
detail: detail
});
node.dispatchEvent(event);
Expand Down

0 comments on commit 43fe8b9

Please sign in to comment.