mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Add originating widget to event objects
This commit is contained in:
parent
81f07cdf85
commit
33d973fb91
@ -421,6 +421,7 @@ Widget.prototype.addEventListener = function(type,handler) {
|
||||
Dispatch an event to a widget. If the widget doesn't handle the event then it is also dispatched to the parent widget
|
||||
*/
|
||||
Widget.prototype.dispatchEvent = function(event) {
|
||||
event.widget = event.widget || this;
|
||||
// Dispatch the event if this widget handles it
|
||||
var listener = this.eventListeners[event.type];
|
||||
if(listener) {
|
||||
|
Loading…
Reference in New Issue
Block a user