diff --git a/dom.bs b/dom.bs index fd1f7b13..2acca874 100644 --- a/dom.bs +++ b/dom.bs @@ -334,7 +334,7 @@ to remove all event listeners in that group:
oven.addEventListener("turnon", () => { … }, { group: "brownies" }) -oven.addEventListener("heat", () => { … }, { group: "brownies" }) +oven.addEventListener("heat", () => { … }, { group: ["brownies", "adjustments"] }) oven.addEventListener("turnoff", () => { … }, { group: "brownies" }) oven.removeEventListener({ group: "brownies" }) @@ -916,7 +916,7 @@ dictionary RemoveEventListenerGroupOptions { dictionary AddEventListenerOptions : EventListenerOptions { boolean passive = false; boolean once = false; - EventGroup group; + (EventGroup or sequence<EventGroup>) group; };@@ -936,7 +936,7 @@ when something has occurred.
Let capture be the result of flattening options. -
Let once and passive, and let group be null. +
Let once and passive, and let groups be an empty + list.
If options is a dictionary, then: @@ -1047,24 +1050,33 @@ steps:
Set passive to options["{{AddEventListenerOptions/passive}}"] and once to options["{{AddEventListenerOptions/once}}"]. -
If {{AddEventListenerOptions/group}} is present in options, set - group to options["{{AddEventListenerOptions/group}}"]. +
If {{AddEventListenerOptions/group}} is present in options and is an + {{EventGroup}}, set groups to a list containing the single item given by + options["{{AddEventListenerOptions/group}}"]. + +
Otherwise, if {{AddEventListenerOptions/group}} is present in options, + set groups to options["{{AddEventListenerOptions/group}}"].
Return the tuple (capture, passive, once, - group). + groups). -
To perform a service worker check on eventTarget, -throw a {{TypeError}} if eventTarget's relevant global object is a -{{ServiceWorkerGlobalScope}} object and its associated service worker's -script resource's +
To perform a service worker check on an {{EventTarget}} +eventTarget, throw a {{TypeError}} 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. [[!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 certain {{EventTarget}} methods is allowed only during the very first evaluation of the service worker script. +
To remove an event listener +listener from an {{EventTarget}} eventTarget, set listener's +removed to true and remove it from eventTarget's associated list +of event listeners. +
The
addEventListener(type, callback, options)
method, when invoked, must run these steps:
@@ -1074,7 +1086,7 @@ method, when invoked, must run these steps:
If callback is null, then return. -
Let (capture, passive, once, group) be the +
Let (capture, passive, once, groups) be the result of flattening more options.
If context object's associated list of event listener does not contain an @@ -1082,7 +1094,7 @@ method, when invoked, must run these steps: and capture is capture, then append a new event listener to it, whose type is type, callback is callback, capture is capture, passive is passive, once is once, and - group is group. + groups is groups.
The @@ -1096,8 +1108,7 @@ method overload, when invoked, must run these steps:
If there is an event listener in the associated list of event listeners whose type is type, callback is callback, and capture is - capture, then set that event listener's removed to true and remove it from - the associated list of event listeners. + capture, then remove it.
The @@ -1107,8 +1118,8 @@ method overload, when invoked, must run these steps:
Remove all event listeners in the associated list of event listeners whose - type is type and group is +
Remove all event listeners whose type is + type and groups contains options["{{RemoveEventListenerGroupOptions/group}}"].
Remove all event listeners in the associated list of event listeners whose - group is options["{{RemoveEventListenerGroupOptions/group}}"]. +
Remove all event listeners whose groups + contains options["{{RemoveEventListenerGroupOptions/group}}"].
The dispatchEvent(event)
method, when