1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-08 15:19:40 -05:00

fix(extensiosn/web): AddEventListenerOptions.signal shouldn't be nullable (#11348)

This commit is contained in:
Divy Srivastava 2021-07-10 19:43:58 +05:30 committed by GitHub
parent 5bf753713c
commit b3f22d3fdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -929,7 +929,10 @@
this.removeEventListener(type, callback, options); this.removeEventListener(type, callback, options);
}); });
} }
} else if (options?.signal === null) {
throw new TypeError("signal must be non-null");
} }
ArrayPrototypePush(listeners[type], { callback, options }); ArrayPrototypePush(listeners[type], { callback, options });
} }

View file

@ -1977,9 +1977,7 @@
"event.any.html": true "event.any.html": true
}, },
"events": { "events": {
"AddEventListenerOptions-signal.any.html": [ "AddEventListenerOptions-signal.any.html": true,
"Passing null as the signal should throw"
],
"Event-isTrusted.any.html": true, "Event-isTrusted.any.html": true,
"EventTarget-constructible.any.html": true, "EventTarget-constructible.any.html": true,
"Event-constructors.any.html": [ "Event-constructors.any.html": [