aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed')
-rw-r--r--ext/mixed/js/core.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/mixed/js/core.js b/ext/mixed/js/core.js
index 351d9371..7eb21659 100644
--- a/ext/mixed/js/core.js
+++ b/ext/mixed/js/core.js
@@ -325,6 +325,11 @@ class EventDispatcher {
}
return false;
}
+
+ hasListeners(eventName) {
+ const callbacks = this._eventMap.get(eventName);
+ return (typeof callbacks !== 'undefined' && callbacks.length > 0);
+ }
}
class EventListenerCollection {