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

> I don't see why. Your XHR example would work exactly the same whether XHR had this constraint or not, note...

You're right. I picked up a wrong example indeed. Proper examples would be cases where the event listers are set up within other event handlers or other asyc callbacks. The point is, considering SW's lifetime, setting up event handlers in async tasks wouldn't guarantee they will be run.

> I don't know what you meant by "current behavior"

Sorry for the confusion. I meant the behavior that addEventListener throws.

> Well, you could start by only throwing, if you're going to throw at all, for a specific whitelist of event names that are reserved by the SW spec for its own purposes, instead of blanket-throwing on everything in sight.

That makes sense. For the exact spec language, I'd want to improve the definition of [function events](https://w3c.github.io/ServiceWorker/#dfn-functional-events) so it can be used to reference the SW events with future extensions inclusive.

-- 
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-259883629

Received on Friday, 11 November 2016 05:22:40 UTC