I am trying to implement support for WebKit's native desktop notifications on my site. When I try to ask for user's permission to use the notifications, absolutely nothing happens. For example, the following HTML does not prompt Chrome to ask me for permission:
<html lang="en">
<head></head>
<body>
<h1>Testing</h1>
<script>
window.webkitNotifications.requestPermission();
</script>
</body>
</html>
I know that there is no problem with my version of Chrome because other sites (e.g. http://www.html5rocks.com/tutorials/notifications/quick/) work perfectly fine: I can see both the prompt and the subsequent notifications.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…