Enable HTML5 notifications straightaway
Hi,
I want to ask the user for html5 notifications as he launches the site. I tried a dirty hack clicking on a button with jQuery but it doesn't work. It only works if it's the user the one who clicks the button.
I know this doesn't have to do with your library but why is that, and how can we bypass this issue?
Thanks
I acheived this by calling the $notification.enableHtml5Mode(); in a timeout. But it seems to work only in chrome. Other browsers won't show anything :S
Browsers have security around enabling client side notifications. The only way the security won't flag the request is if its triggered based on a browser side click. Once enabled once for a site, it can be used (and checked with Notifications.permissions) without a click.