I got the same result. permission request not working...
-
Pedro Junior
----- Original Message -----
From: PhistucK
To: Chromium-discuss
Sent: Friday, January 08, 2010 8:15 AM
Subject: [chromium-discuss] Desktop Notifications - Do They Work For Anyone?
I am trying to implement Desktop Notifications in a regular webpage (also
tried it in an options page of an extension, same results) and it does not ask
for permission (hence not showing the notification).
Here is a sample code, that shows no error -
function NotifyDesktop()
{
console.log("This page has asked and may have received a permission for
notifications.");
if (ShowNotifications)
{
var DesktopNotification =
webkitNotifications.createNotification("AssignmentChecker","Another assignment
has been checked.","");
DesktopNotification.show();
}
else
console.log("We are not authorized to use notifications.");
}
function CheckNotifications()
{
console.log("We got a response to the permission request.");
if (webkitNotifications.checkPermission() == 1)
ShowNotifications = true;
NotifyDesktop();
}
if (!console)
var console = { log : function(str) { window.status = str; } }
var ShowNotifications = false;
if (webkitNotifications)
{
console.log("This browser supports notifications.");
webkitNotifications.requestPermission(CheckNotifications);
}
This results in one console logging - "This browser supports notifications.".
It does not show the infobar for the permission request, nor executing the
callback function.
Is anyone else experiencing this?
☆PhistucK
------------------------------------------------------------------------------
--
Chromium Discussion mailing list: [email protected]
View archives, change email options, or unsubscribe:
http://groups.google.com/group/chromium-discuss--
Chromium Discussion mailing list: [email protected]
View archives, change email options, or unsubscribe:
http://groups.google.com/group/chromium-discuss