add { once: true } to deactivate-paste-mode event listener

This commit is contained in:
schlagmichdoch 2023-03-06 11:59:56 +01:00
parent fdf024f378
commit 36e152dc7c
4 changed files with 10 additions and 10 deletions

View file

@ -974,11 +974,11 @@ class Events {
window.dispatchEvent(new CustomEvent(type, { detail: detail }));
}
static on(type, callback) {
return window.addEventListener(type, callback, false);
static on(type, callback, options = false) {
return window.addEventListener(type, callback, options);
}
static off(type, callback) {
return window.removeEventListener(type, callback, false);
static off(type, callback, options = false) {
return window.removeEventListener(type, callback, options);
}
}