W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2013

[whatwg] [Notifications] Constructor should not have side effects

From: Elliott Sprehn <esprehn@gmail.com>
Date: Mon, 28 Jan 2013 17:15:47 -0500
Message-ID: <CAPJYB1iYE+vp=vOL22_swhij3uoj49gFFTVU2b+0CyzsHiUBuQ@mail.gmail.com>
To: WHATWG <whatwg@whatwg.org>
The Notification constructor should not have side effects. This is
generally considered bad design, and the rest of the platform doesn't have
this either.

Specifically new Notification() should not show the notification since it
prevents reuse of the notification after calling close(), and is surprising
behavior.

(ex. new XMLHttpRequest doesn't fire the request, new HTMLDivElement()
shouldn't append it to the document, ...)

- E
Received on Monday, 28 January 2013 22:16:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:12 GMT