W3C home > Mailing lists > Public > public-web-notification@w3.org > October 2010

Re: Some comments on the API

From: James Graham <jgraham@opera.com>
Date: Mon, 18 Oct 2010 10:46:22 +0200
Message-ID: <4CBC095E.1000803@opera.com>
To: Doug Turner <dougt@dougt.org>
CC: Anne van Kesteren <annevk@opera.com>, Web Notification WG <public-web-notification@w3.org>
On 10/17/2010 06:16 PM, Doug Turner wrote:
>> Per the current specification it would be at window.Notification,
>> to be exact.
> Right.  I am not an advocate of putting this on window.  This is
> unlike alert(), confirm(), prompt() which are tied to a dom window.
> This api is tied more to a user agent itself, and for that, we use
> navigator.*.

As well as the technical point about the interface object existing on 
Window anyway, as explained by Jonas, it is unclear to me that 
notifications are conceptually part of the overall browser rather than 
tied to a specific DOM window. If I attach any event listeners to a 
particular notification, they will be bound to a particular window. 
After a window is closed or navigated it no longer makes any sense to 
display notifications from that window. Indeed, the draft should specify 
exactly what happens when a window with visible or pending notifications 
is unloaded, by hooking into the "unloading document cleanup steps" [1]. 
I imagine this should say that all such notifications should be canceled 
without firing any events.

Received on Monday, 18 October 2010 08:47:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:53:13 UTC