Re: [whatwg/dom] Nerfing all events on all event targets in a serviceworker after initial script evaluation seems odd (#371)

@annevk, other events are already opt-in. As answered to @wanderview's question, I thought checking the "set of event types to handle" in [Handle Functional Event](https://w3c.github.io/ServiceWorker/#handle-functional-event-algorithm) step 4 is generally beneficial by avoiding SW start-up delay for scripts that don't (deterministically) register any listener for the event.

I'm not against revisiting the design. Indeed we (SW folks including you and me) had discussed this and settled on the current setup (I admit I missed things when having spec'd them as pointed in this issue) together, so I'd like to hear more comments from the folks before we move on. /cc @slightlyoff, @jakearchibald, @wanderview, @aliams @hober

FYI, here's the minute of the f2f where we discussed this issue: https://lists.w3.org/Archives/Public/public-webapps/2016JanMar/0096.html.
```
#718: Proposal: Optimized No-Fetch Service Workers
     * Resolved: check which event listeners have been registered via addEventListener and optimize based on that - additionally, addEventListener should throw an error if it’s called after the initial execution of the script (e.g. in an event handler) 
```

-- 
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/issues/371#issuecomment-259920757

Received on Friday, 11 November 2016 09:48:29 UTC