5

In the SO answer below, I've inserted working code that demonstrates the Notification API. While it works on JSBin, it doesn't seem to work on SO, possibly because the identifier of the window that generates is the empty string. The code requests permission to display notifications, but it is never granted.

Chrome desktop notification example

1 Answer 1

5

Thanks for bringing this up. Stack Snippets uses HTML5 iframe sandboxing in order to remain secure and prevent malicious code from hurting our users. This sandboxing prevents such actions as window access and notifications. This is therefore by design.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .