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

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.


>> We could
>> make a division between notification records and notification objects.
>> And we could even go as far as only offer notification records for
>> notifications associated with a service worker.
>
> I don't really understand this.

The proposal for service workers is that all events go to the service
worker and not to the notification. As such I thought we could maybe
make a distinction between notifications associated with a service
worker and without one. For those notifications asssociated with a
service worker, all we need to expose from the notification is a
record of its various properties, but that does not need to support
event handling. For notifications without a service worker (the model
we have cross-browser today) we could continue to support it as an
event target, but perhaps not support the whole multiple Notification
objects per notification model as at that point you should probably
start using service workers anyway.


-- 
http://annevankesteren.nl/

Received on Tuesday, 26 August 2014 09:18:48 UTC