- From: James Graham <jgraham@opera.com>
- Date: Mon, 18 Oct 2010 10:46:22 +0200
- 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. [1] http://www.whatwg.org/specs/web-apps/current-work/complete.html#unloading-document-cleanup-steps
Received on Monday, 18 October 2010 08:47:02 UTC