Intent to ship Notification API on Web Workers

Skip to first unread message

Jun 29, 2015, 11:46:44 PM6/29/15

Target release: Firefox 41
Implementation and shipping bug:

Gecko already implements support for the Notification API on window behind the dom.webnotifications.enabled pref, and this has been enabled by default for at least a year. This is the intent to ship the same API on workers, guarded by the same pref, so it will be enabled by default.

The patches landed on central on July 29, 2015. These patches implement support for the Notification constructor on dedicated and shared workers. This is exposed via the Notification constructor.

The Service Worker parts of the Notification API are not shipping yet due to breaking some Gaia tests. That implementation is tracked in

Potential for abuse?
This API allows workers to abuse the user. There are some safeguards in place.
1) Notification.requestPermission() which prompts the user to grant permission is only available on window. This means the website cannot secretly acquire permission. It is also clear to the user which origin is requesting the permission.
2) Each notification displays the origin it came from. The user can revoke permission using the standard user agent mechanisms (Page Info in Firefox).

Platforms: All platforms.

Support in other engines:
Blink - shipped -!topic/blink-dev/4WNnq8BIydI
Webkit - I don't have a way to try this out, but from the Blink intent to ship, it seems it isn't supported.
Edge/Trident: not supported

Developer documentation:, the doc has not been updated for worker support yet.


Jun 30, 2015, 5:13:21 PM6/30/15
yes, please!
Reply all
Reply to author
0 new messages