mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-03 04:39:10 +00:00
Allow macros to specify capturing event handlers
This commit is contained in:
parent
28fd037c47
commit
c168ec0ad4
@ -187,7 +187,11 @@ Macro.prototype.addEventHandlers = function() {
|
||||
if(this.info.events && this.child) {
|
||||
for(var t=0; t<this.info.events.length; t++) {
|
||||
// Register this macro node to handle the event via the handleEvent() method
|
||||
this.child.domNode.addEventListener(this.info.events[t],this,false);
|
||||
var info = this.info.events[t];
|
||||
if(typeof info === "string") {
|
||||
info = {type: info};
|
||||
}
|
||||
this.child.domNode.addEventListener(info.type,this,info.capture);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user