New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 14 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jul 2010
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug

  • Only users with Commit permission may comment.

Sign in to add a comment

Desktop Notifications permission request does not work from within the console

Project Member Reported by, Jan 7 2010

Issue description

Chrome Version       :\
URLs (if applicable) : any, try

What steps will reproduce the problem?
1. Go to the Developer Tools on some page.
2. In the console, type -
webkitNotifications.requestPermission(function(){alert("The permission was 

What is the expected result?
A permission request infobar will show.

What happens instead?
Nothing happens.
Labels: -Area-Undefined WebKit-DevTools OS-Windows
Status: Untriaged

Comment 2 by, Jan 7 2010

Note that it does work when you type it as -
javascript:void(webkitNotifications.requestPermission(function(){alert("The permission was 
In the Omnibox, which should be interchangeable, I believe.
Labels: -WebKit-DevTools Feature-Notifications
Summary: Request a Desktop Notification permission does not show (renders the feature unusable)
Update - this is not working everywhere (Developer Tools, web pages, extension pages). 
Only through the location bar.
Summary: Request a Desktop Notification permission info bar does not show (renders the feature unusable)
I have noticed that is not working only in console, if you call request permission in 
source-code will work.

eg: onclick="Reqfunc()" or onclick="webkitNotifications.requestPermission()" = Work!

if you call Reqfunc() in console will not work too.
Labels: WebKit-DevTools
Summary: Desktop Notifications permission request does not work from within the console
Oh, then this is by design, according to  Issue 27215 .
But, the fact that it does not work from the DevTools console and does work from the 
omnibox is an inconsistency.
Reverting back to the original summary.
Labels: Area-DevTools
Labels: -webkit-devtools Feature-DevTools
Labels: Area-Feature
I don't understand the purpose of this notification API in the light of  issue 27215 .

If notifications permission alerts are only displayed as a response to a user action, 
why the need to call requirePermission? The browser could automatically show it for the 
first time. Is it only to ensure that user code can still run while waiting for the 

In any case, it doesn't seem to be too programmer-friendly.
The point is to prevent unwanted infobars; this is why it can only appear on a user

Since createNotification().show() can be done without user gesture, requesting
permission on first use would also create an unwanted infobar.
Labels: -Area-Feature Area-UI

Comment 13 by, Apr 29 2010

Not a Bug, Feature.

Desktop Notifications can only be triggered via a user action.  Typing into the 
JavaScript console has the same effect as raw javascript code embedded into the web 
page (no user action).  Typing the javascript into the location bar, however, 
represents a user-action (the user is intentionally visiting a javascript link to 
enable notifications, probably for sites that tend to use href="javascript:" instead 
of onclick="".

I'm pretty sure this is a non-issue.

Comment 14 by, Jul 9 2010

Labels: -Area-DevTools Area-WebKit

Comment 15 by, Jul 12 2010

Labels: Mstone-X
Status: WontFix
Closing per comment #13.

Comment 17 by, Mar 30 2011

My chrome had been updated to 10.0.648.204, but it still doesn't work with code in javascript(It doesn't change anything, so my code won't run downstairs). Only change "Notifications" in "Options" - "Content Settings" manual.

And webkitNotifications.requestPermission(function(){alert("The permission was given.")}) doesn't work anymore, untill run in location with "javascript:..." but also didn't change settings.

Comment 18 by, Mar 31 2011

Comment 13´╝îgreat, it works!
Project Member

Comment 19 by, Oct 12 2012

Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member

Comment 20 by, Mar 11 2013

Labels: -Feature-Notifications -Area-WebKit -Feature-DevTools -Area-UI Cr-Content Cr-UI-Notifications Cr-UI Cr-Platform-DevTools
Project Member

Comment 21 by, Apr 6 2013

Labels: -Cr-Content Cr-Blink

Sign in to add a comment