From d3ebe22a5836643ffc3fd50e5853469a5ff6f455 Mon Sep 17 00:00:00 2001 From: Waseem Daher Date: Tue, 26 Feb 2013 17:46:53 -0500 Subject: [PATCH] Allow Safari desktop notifications. Apparently the Safari version of requestPermission wants to take a callback function as an argument and gets unhappy when you don't give it to them. I learned this tip from http://www.inserthtml.com/2012/07/html5-app/ But more importantly, from the draft spec at http://dev.chromium.org/developers/design-documents/desktop-notifications/api-specification mentions that requestPermission takes a callback function that is invoked once the user accepts. (imported from commit c1d98239028ffce2e294568c5711315f985160a3) --- zephyr/static/js/notifications.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zephyr/static/js/notifications.js b/zephyr/static/js/notifications.js index 908017d2c8..b5217535a8 100644 --- a/zephyr/static/js/notifications.js +++ b/zephyr/static/js/notifications.js @@ -78,7 +78,7 @@ exports.initialize = function () { return; } if (window.webkitNotifications.checkPermission() !== 0) { // 0 is PERMISSION_ALLOWED - window.webkitNotifications.requestPermission(); + window.webkitNotifications.requestPermission(function () {}); asked_permission_already = true; } });