diff --git a/dom.bs b/dom.bs index 2f00ca5ab..56a9e8c2d 100644 --- a/dom.bs +++ b/dom.bs @@ -1062,15 +1062,18 @@ and an event listener listener, run these steps:
  1. -

    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 listener observes a functional event, eventTarget is a + {{ServiceWorkerGlobalScope}} object, and its associated service worker's script resource's has ever been evaluated flag is set, + then the user agent must show a message on a developer console that the user agent stores the event + type of the functional event for the service worker only + during the very first evalution of the service worker script, and the asynchronously added + functional event will not start the service worker. [[!SERVICE-WORKERS]] + +

    To optimize storing the event types allowed for the service + worker, Service Workers specification does not store the asynchronously added event type. The event listener will still be added under this condition, + but the implmentations have to inform developers about this behavior.

  2. If listener's callback is null, then return. @@ -1118,11 +1121,13 @@ and an event listener listener, set listener's method, when invoked, must run these steps:

      -
    1. 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]] +

    2. If type is one of the functional events's type, the context object is a {{ServiceWorkerGlobalScope}} object, and its + associated service worker's script resource's has ever been evaluated flag is set, then the user agent must show a message on a + developer console that the user agent will still start the service worker for the + functional event that has been stored during the very first evalution of the service + worker script and is asynchronously removed. [[!SERVICE-WORKERS]]

    3. Let capture be the result of flattening options.