diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2021-07-10 19:43:58 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-10 07:13:58 -0700 |
commit | b3f22d3fdd248e333bb091395f4be3f48dc24733 (patch) | |
tree | 643d31258ac6cb9a1ef8049d01282fb1ca50908f /extensions/web/02_event.js | |
parent | 5bf753713ce8868ba4c43c40cbbb34e68b399e39 (diff) |
fix(extensiosn/web): AddEventListenerOptions.signal shouldn't be nullable (#11348)
Diffstat (limited to 'extensions/web/02_event.js')
-rw-r--r-- | extensions/web/02_event.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/extensions/web/02_event.js b/extensions/web/02_event.js index 6b2cc2c04..a8dd95dbd 100644 --- a/extensions/web/02_event.js +++ b/extensions/web/02_event.js @@ -929,7 +929,10 @@ this.removeEventListener(type, callback, options); }); } + } else if (options?.signal === null) { + throw new TypeError("signal must be non-null"); } + ArrayPrototypePush(listeners[type], { callback, options }); } |