Is there a way to make native window Notifications working inside notebooks?
It would be really useful if we had a way to notify the user about something
Are there other alternatives?
I have created a notebook to display this restriction
https://beta.observablehq.com/@bumbeishvili/window-notifications
At least in Chrome, it isn’t possible to use the native Notification API in a cross-origin iframe (even with cross-origin permissions). See:
https://www.chromestatus.com/feature/6451284559265792
We could possibly provide a proxy API whereby the sandboxed iframe can send a message to the parent window, and then the parent window requests notification permissions for beta.observablehq.com on behalf of your notebook. But this requires a fair amount of machinery, so it’s probably not something that we’ll support in the near future. Sorry.
Thank you for the reply, I understand
Works for me with Firefox 57.0 (64-bit) on Ubuntu 14.04.5