Re: [whatwg] Notification's click event should be cancelable

On Tue, Aug 26, 2014 at 2:18 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
> On Tue, Aug 26, 2014 at 11:06 AM, Jonas Sicking <jonas@sicking.cc> wrote:
>> I don't see a problem with firing events on all Notification
>> instances, and only changing focus if none of the events were
>> cancelled.
>
> It's a somewhat complex design compared to what we probably need long
> term, if long term is service workers.

I'm not convinced that even with SW, the proper design is to tell
websites to always funnel click notifications through a SW.

Alternatively we don't use events here at all. Instead we could use a
.clicked property which returns a promise. This is a typical "one
shot" notification where Promises are better suited than DOM Events.

However I don't actually think that firing events on multiple
EventTargets is that complex.

/ Jonas

Received on Tuesday, 26 August 2014 09:54:27 UTC