- From: Jungkee Song <notifications@github.com>
- Date: Fri, 19 Jul 2019 17:41:56 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/653/review/264474609@github.com>
jungkees commented on this pull request.
> - <p class="note no-backref">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.
+ <p>If <var>listener</var> observes a <a>functional event</a>, <var>eventTarget</var> is a
+ {{ServiceWorkerGlobalScope}} object, and its associated <a>service worker</a>'s <a for="service
+ worker">script resource</a>'s <a for="script resource">has ever been evaluated flag</a> is set,
+ then the user agent must <a>report a warning to the console</a> with a description that explains
+ that the user agent stores the event <a for="event listener">type</a> of the <a>functional
+ event</a> for the <a>service worker</a> only during the very first evalution of the <a>service
+ worker</a> script, and the asynchronously added <a>functional event</a> will not start the
+ <a>service worker</a>. [[!SERVICE-WORKERS]]
+
+ <p class="note no-backref">To optimize storing the event types allowed for the <a>service
+ worker</a>, Service Workers specification does not store the asynchronously added event <a
+ for="event listener">type</a>. The <a>event listener</a> will still be added under this condition,
+ but the implmentations have to inform developers about this behavior.
I guess this note would help implementers understand *why* this behavior was added (while the warning description says what to display to the console as you pointed). I tried to simplify the words.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/653#discussion_r305560092
Received on Saturday, 20 July 2019 00:42:18 UTC