aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-19 17:14:51 -0400
committerGitHub <noreply@github.com>2020-09-19 17:14:51 -0400
commit2ff4f830722940d2bfc35328fa913f93d04a330b (patch)
tree19eb865b31eaaa9c69f6bd913985ae5460e7340d /ext/mixed
parent613c7ebf69413723486ab49a7b2f928422de3541 (diff)
Modal refactor (#842)
* Add Modal class * Use Modal class
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 {