November 2011
Intermediate to advanced
384 pages
13h 23m
English
Before you can display a Desktop Notifications API pop-up window in Chrome, you must request permission from the user using an infobar. An infobar is a subtle slide-down prompt that appears underneath the URL bar and asks the user a question. The user must grant permission for your web app to use the API; otherwise, all other desktop notification calls will be ignored.
This ensures that the user actually wants the desktop notification feature active, avoiding the problems associated with rampant abuse of unwanted pop-up windows in the late 1990s and early 2000s.
Although you can call the checkPermission() method at any time, you can call requestPermission() only on a click event performed ...
Read now
Unlock full access