Re: [w3c/ServiceWorker] Disallow waitUntil() of manually constructed events (#1166)

waitUntil() can run outside of a dispatch task, but the dispatch flag is set when an event is dispatched anyway. Devs can self.dispatchEvent(syntheticEvent), and event.waitUntil() in the event handler won't throw if we don't check isTrusted there. So, the spec behavior's changing with this PR. I think Chrome already handles this in a similar way though it isn't directly using isTrusted: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/serviceworkers/ExtendableEvent.cpp?q=extendableevent&dr=CSs&l=55

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1166#issuecomment-314611973

Received on Wednesday, 12 July 2017 00:46:19 UTC