diff options
Diffstat (limited to 'ext/mixed/js')
-rw-r--r-- | ext/mixed/js/core.js | 5 |
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 { |