I have created a desktop notification with window.webkitNotifications.createNotification().
I've seen that gmail use an onclick event on the notification for the redirection, how is it made?
i have found the solution:
var notification = window.webkitNotifications.createNotification(url,title,teaser);
notification.onclick = function(x) { window.focus(); this.cancel(); $(location).attr('href',path);};
notification.show();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With