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

> That is Run Service Worker the only call sites of which are SW Update/Install/Active, Handle Fetch, Handle Functional Event, and postMessage to SW.

OK, so Run Service Worker doesn't fire random events other than some small whitelist?  Fine, but so what?  ;)

> So this kind of usages is totally feasible

Yes.  The event will be fired if there were upload listeners set before send().

> the constraint was needed

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

> Yes, it throws in the current behavior.

I don't know what you meant by "current behavior", but it doesn't throw in Gecko, and it doesn't throw per the current spec.  Where does it throw?  What causes it to throw there?

> I'm not sure if there's a reasonable way to not throw in the case of CustomEvents.

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.

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

Received on Friday, 11 November 2016 02:41:41 UTC