W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2014

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

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 26 Aug 2014 02:53:33 -0700
Message-ID: <CA+c2ei9+ugH+Pwpmzvexf03wyYXaQvzgYP_5r04x5FJjJaKpxA@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: atwilson@chromium.org, Robert Bīndar <robertbindar@gmail.com>, whatwg <whatwg@whatwg.org>, Olli Pettay <olli@pettay.fi>, Jake Archibald <jaffathecake@gmail.com>, Michael Henretty <michael.henretty@gmail.com>, Peter Beverloo <beverloo@google.com>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:22 UTC