mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-20 02:07:38 +00:00
Add support for action widgets
This is part of the groundwork for fixing #336
This commit is contained in:
@@ -475,6 +475,20 @@ Widget.prototype.removeChildDomNodes = function() {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Invoke any action widgets that are immediate children of this widget
|
||||
*/
|
||||
Widget.prototype.invokeActions = function(event) {
|
||||
var handled = false;
|
||||
for(var t=0; t<this.children.length; t++) {
|
||||
var child = this.children[t];
|
||||
if(child.invokeAction && child.invokeAction(this,event)) {
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
return handled;
|
||||
};
|
||||
|
||||
exports.widget = Widget;
|
||||
|
||||
})();
|
||||
|
Reference in New Issue
Block a user