- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Fri, 07 Jun 2013 05:55:38 -0400
- To: public-web-notification@w3.org
Section 7.1 has an example like so: new Notification("New Email Received", { iconUrl: "mail.png", onshow: function() { setTimeout(notification.close(), 15000); } }); But there is no "notification" in that snippet. Furthermore, even if we assume the return value of the constructor is being assigned to "notification", this code will call close() immediately onshow. If one actually wants the close delayed by 15 seconds, the code needs to be more like: new Notification("New Email Received", { iconUrl: "mail.png", onshow: function() { setTimeout(this.close.bind(this), 15000); } }); -Boris
Received on Friday, 7 June 2013 09:56:06 UTC