[w3c/ServiceWorker] Behavior of the onfetch setter regarding no-fetch service workers (#1004)

With the changes discussed in #718 addEventListener should throw unless called during the script's initial evaluation. What should be the behavior of setting the onfetch event handler?

I'm guessing it should throw as well, but this was not included in the spec.

from https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-attributes
> When an event handler H of an element or object T implementing the EventTarget interface is first set to a non-null value, the user agent must append an event listener to the list of event listeners associated with T with type set to the event handler event type corresponding to H and callback set to the event handler processing algorithm defined below. 

This can be changed to use addEventListener for adding the event listener.



-- 
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/issues/1004

Received on Wednesday, 9 November 2016 19:45:43 UTC