Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix(jqLite): allow override of jqLite.triggerHandler event object
Browse files Browse the repository at this point in the history
  • Loading branch information
matsko authored and mhevery committed Jun 18, 2013
1 parent 6822709 commit 0cac872
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/jqLite.js
Original file line number Diff line number Diff line change
Expand Up @@ -775,12 +775,15 @@ forEach({

clone: JQLiteClone,

triggerHandler: function(element, eventName) {
triggerHandler: function(element, eventName, eventData) {
var eventFns = (JQLiteExpandoStore(element, 'events') || {})[eventName];
var event;
eventData = eventData || {
preventDefault: noop,
stopPropagation: noop
};

forEach(eventFns, function(fn) {
fn.call(element, {preventDefault: noop});
fn.call(element, eventData);
});
}
}, function(fn, name){
Expand Down

0 comments on commit 0cac872

Please sign in to comment.