On Mon, Aug 25, 2014 at 6:42 PM, Jonas Sicking <jo...@sicking.cc> wrote:
> I definitely think we need the ability for code running in Windows
> (i.e. code that handles UI) to be able to enumerate any notifications
> created by the website.

Fair, but maybe those "copy objects" should not get events. 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.

So you have notifications that work per today and are only exposed to
Window. And then you have notifications associated with a service
worker. For the latter the events will go towards the service worker
and everyone (same-origin) can get a hold of a notification record for
them using Notification.get(). From a service worker, new
Notification() will do the right thing, from anywhere else you need to
associate it with one explicitly.

(It could be even better if we had mixins, then only notification
objects not associated with a service worker would have the event
stuff. There's no need for that for notifications associated with a
service worker or notification records.)


-- 
http://annevankesteren.nl/

Reply via email to