summaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-07 20:12:43 -0400
committerGitHub <noreply@github.com>2020-09-07 20:12:43 -0400
commit0a5e832dfddcc6184410e8836cc8dea030457486 (patch)
treee57f69567874327fe994926b97ec386e86a959ec /ext/mixed/js
parent59559fc56080640806f6a06d25989b9b64307300 (diff)
Mouse inputs (#783)
* Add mouse icon * Add _updateModifiers * Add support for mouse button modifiers * Improve names of mouse inputs * Improve mouse input sorting * Rename getModifierKeyStrings to getModifierInputStrings * Refactor keyboard/mouse inputs into KeyboardMouseInputField
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/core.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/mixed/js/core.js b/ext/mixed/js/core.js
index c5c6fef2..8b044a67 100644
--- a/ext/mixed/js/core.js
+++ b/ext/mixed/js/core.js
@@ -341,6 +341,14 @@ class EventListenerCollection {
return this._eventListeners.length;
}
+ addGeneric(type, object, ...args) {
+ switch (type) {
+ case 'addEventListener': return this.addEventListener(object, ...args);
+ case 'addListener': return this.addListener(object, ...args);
+ case 'on': return this.on(object, ...args);
+ }
+ }
+
addEventListener(object, ...args) {
object.addEventListener(...args);
this._eventListeners.push(['removeEventListener', object, ...args]);