diff --git a/dom.bs b/dom.bs index 7231bfb6..8f355605 100644 --- a/dom.bs +++ b/dom.bs @@ -949,10 +949,10 @@ callback interface EventListener { dictionary EventListenerOptions { boolean capture; - boolean passive; }; dictionary AddEventListenerOptions : EventListenerOptions { + boolean passive; boolean once; }; @@ -1012,8 +1012,8 @@ specified otherwise it returns null. will only be invoked once after which the event listener will be removed. The event listener is appended to target's list of event listeners and is - not appended if it is a duplicate, i.e., having the same type, callback, - capture and passive values. + not appended if it is a duplicate, i.e., having the same type, callback, and + capture values.
target . removeEventListener(type, callback [, options])
Remove the event listener @@ -1032,27 +1032,27 @@ specified otherwise it returns null. steps:
    -
  1. Let capture and passive be false. +

  2. Let capture be false.

  3. If options is a boolean, set capture to options.

  4. If options is a dictionary and {{EventListenerOptions/capture}} is present in options with value true, then set capture to true. -

  5. If options is a dictionary and {{EventListenerOptions/passive}} is - present in options with value true, then set passive to true. - -

  6. Return capture and passive. +

  7. Return capture.

To flatten more options, run these steps:

    -
  1. Let capture and passive be the result of flattening +

  2. Let capture be the result of flattening options. -

  3. Let once be false. +

  4. Let once and passive be false. + +

  5. If options is a dictionary and {{AddEventListenerOptions/passive}} is + present in options with value true, then set passive to true.

  6. If options is a dictionary and {{AddEventListenerOptions/once}} is present in options with value true, then set once to true. @@ -1081,10 +1081,9 @@ method, when invoked, must run these steps:

  7. If context object's associated list of event listener does not contain an event listener whose type is type, callback is callback, - capture is capture, and passive is passive, then append a new - event listener to it, whose type is type, callback is - callback, capture is capture, passive is passive, - and once is once. + 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, and once is once.

The @@ -1096,13 +1095,12 @@ method, when invoked, must, run these steps its associated service worker's script resource's has ever been evaluated flag is set, throw a TypeError. [[!SERVICE-WORKERS]] -

  • Let capture and passive be the result of flattening - options. +

  • Let capture be the result of flattening options.

  • If there is an event listener in the associated list of event listeners whose - type is type, callback is callback, capture is - capture, and passive is passive then set that event listener's - removed to true and remove it from the associated list of event listeners. + 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.

    The dispatchEvent(event) method, when