For some unknown reason WebKit requires window.webkitNotifications.requestPermission() to be associated with an event. Since there is no immediate function without some direct user it makes not only coding window.webkitNotifications.requestPermission() awkward and a waste of time it also forces web developers to require some convoluted task of the user to trigger the method.