Re: Feedback from Safari on Web Notifications

On Tue, 13 Mar 2012 21:35:51 +0100, Jon Lee <jonlee@apple.com> wrote:
> Then does setting them in the constructor syntactic sugar for
>
> n.onshow = showcallback;
>
> or
>
> n.addEventListener("show", showcallback, false);

The former I would say.


> Also, is there no other spec that includes callbacks in the options  
> dictionary?

Currently there is none, so maybe we should not do this for now and  
instead require them to be set separately just as with WebSocket and  
EventSource?

As for callbacks versus events, you would generally use events if you  
expect multiple independent listener functions to be useful. Events might  
also be more useful in the future if you want to extend some  
functionality. I guess we'd have to look at use cases again if we want to  
reconsider the current design.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Tuesday, 13 March 2012 21:58:14 UTC