summaryrefslogtreecommitdiff
path: root/ext/mixed
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed')
-rw-r--r--ext/mixed/img/mouse.svg1
-rw-r--r--ext/mixed/js/core.js8
2 files changed, 9 insertions, 0 deletions
diff --git a/ext/mixed/img/mouse.svg b/ext/mixed/img/mouse.svg
new file mode 100644
index 00000000..80c400e6
--- /dev/null
+++ b/ext/mixed/img/mouse.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M7.4883 1.0273C4.9609 1.29264 3 3.4984 3 6.1992v.30078h4.5v-5.4727c-.00385.0004-.00787-.0004-.01172 0zm1.0117 0V6.5H13v-.30078c0-2.7049-1.967-4.9121-4.5-5.1719zM3 7.5v2.3008C3 12.6816 5.23 15 8 15s5-2.3184 5-5.1992V7.5H3z" fill="#333"/></svg> \ No newline at end of file
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]);