diff --git a/source b/source index 35f64750446..469ea55ecde 100644 --- a/source +++ b/source @@ -3183,10 +3183,13 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • composed flag
  • isTrusted attribute
  • initEvent() method
  • +
  • add an event listener
  • addEventListener() method
  • EventListener callback interface
  • The type of an event
  • -
  • The concept of an event listener and the event listeners associated with an EventTarget
  • +
  • An event listener and its + type and + callback
  • The encoding (herein the character encoding) and content type of a Document
  • @@ -89690,22 +89693,38 @@ dictionary PromiseRejectionEventInit : EventInit {
    -

    When an event handler H of an element or object - T implementing the EventTarget interface is first set to a non-null value, - the user agent must append an event listener to the - list of event listeners associated with T - with type set to the event handler event type corresponding to - H and callback set to the result of creating a Web IDL EventListener instance representing a reference to a function of - one argument that executes the steps of the event handler processing algorithm, given - H and its argument. The EventListener's - callback context can be arbitrary; it does not impact the steps of the event - handler processing algorithm.

    - -

    The callback is emphatically not the event handler itself. Every event handler ends up registering the same - callback, the algorithm defined below, which takes care of invoking the right callback, and - processing the callback's return value.

    +

    When an event handler H of an + EventTarget object T is first set to a non-null value, then: + +

      +
    1. +

      Let callback be the result of creating a Web IDL EventListener instance representing a reference to a function + of one argument that executes the steps of the event handler processing algorithm, + given H and its argument.

      + +

      The EventListener's callback context can + be arbitrary; it does not impact the steps of the event handler processing + algorithm.

      + +

      The callback is emphatically not the event handler itself. Every event handler ends up registering the same + callback, the algorithm defined below, which takes care of invoking the right callback, and + processing the callback's return value.

      +
    2. + +
    3. +

      Let listener be a new event listener whose type is the event handler event type + corresponding to H and callback is + callback.

      + +

      To be clear, an event listener is different from an EventListener.

      +
    4. + +
    5. Add an event listener with T and listener.

    6. +

    This only happens the first time the event handler's value is set. Since listeners are called in the order they were registered, the @@ -120803,6 +120822,7 @@ INSERT INTERFACES HERE Carlos Gabriel Cardona, Carlos Perelló Marín, Casey Leask, + Cătălin Badea, Cătălin Mariș, Chao Cai, 윤석찬 (Channy Yun),