I get a weird error when I try to ask for permissions for displaying desktop notifications on Safari I get a typeError. I got a button which triggers `window.webkitNotifications.requestPermission()' onclick.
HTML Code:
<button id='btn'>Request Permissions</button>
Javascript:
var btn = document.getElementById( 'btn' );
btn.onclick = function () {
window.webkitNotifications.requestPermission();
}
This snippet works fine on Chrome, but on Safari throws a typeError.
The website runs on localhost.