W3C home > Mailing lists > Public > public-web-notification@w3.org > March 2012

Re: Feedback from Safari on Web Notifications

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 13 Mar 2012 22:57:38 +0100
To: "John Gregg" <johnnyg@google.com>, "Jon Lee" <jonlee@apple.com>
Cc: "Edward O'Connor" <eoconnor@apple.com>, "James Graham" <jgraham@opera.com>, "Ojan Vafai" <ojan@chromium.org>, "Maciej Stachowiak" <mjs@apple.com>, public-web-notification@w3.org
Message-ID: <op.wa4pycme64w2qv@annevk-macbookpro.local>
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

This archive was generated by hypermail 2.4.0 : Thursday, 1 July 2021 16:05:28 UTC