diff --git a/dom.bs b/dom.bs index 66a790bc4..91e91f6c2 100644 --- a/dom.bs +++ b/dom.bs @@ -1150,16 +1150,13 @@ participate in a tree structure.
and an event listener listener, run these steps:If eventTarget's relevant global object is a {{ServiceWorkerGlobalScope}}
- object and its associated service worker's script resource's
- has ever been evaluated flag is set, then throw a
- TypeError
.
- [[!SERVICE-WORKERS]]
-
-
To optimize storing the event types allowed for the service worker and - to avoid non-deterministic changes to the event listeners, invocation of the method is allowed - only during the very first evaluation of the service worker script. +
If eventTarget is a {{ServiceWorkerGlobalScope}} object, its + service worker's + script resource's + has ever been evaluated flag is set, and listener's + type matches the {{Event/type}} attribute value of any of the + service worker events, then report a warning to the console that this might not give + the expected results. [[!SERVICE-WORKERS]]
If listener's callback is null, then return. @@ -1189,30 +1186,35 @@ method, when invoked, must run these steps: once.
To remove an event listener, given an {{EventTarget}} object eventTarget -and an event listener listener, set listener's -removed to true and remove listener from -eventTarget's event listener list. - +
To remove an event listener, given an {{EventTarget}} object +eventTarget and an event listener listener, run these steps: + +
If the context object is a {{ServiceWorkerGlobalScope}} object and its + service worker's + set of event types to handle contains type, then + report a warning to the console that this might not give the expected results. + [[!SERVICE-WORKERS]] + +
Set listener's removed to true and + remove listener from eventTarget's + event listener list. +
HTML needs this to define event handlers. [[HTML]]
To remove all event listeners, given an {{EventTarget}} object eventTarget, for each listener of eventTarget's event listener list, remove an event listener with eventTarget and listener. -
HTML needs this to define document.open()
. [[HTML]]
+
HTML needs this to define document.open()
. [[HTML]]
The
removeEventListener(type, callback, options)
method, when invoked, must run these steps:
If the context object's relevant global object is a
- {{ServiceWorkerGlobalScope}} object and its associated service worker's
- script resource's
- has ever been evaluated flag is set, then throw a
- TypeError
. [[!SERVICE-WORKERS]]
-
Let capture be the result of flattening options.
If the context object's event listener list