mirror of https://github.com/zulip/zulip.git
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)
This commit is contained in:
parent
fc085cbd77
commit
d3ebe22a58
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue