This is an archived page. It's not actively maintained.


This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Obsolete since Gecko 22 (Firefox 22 / Thunderbird 22 / SeaMonkey 2.19)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Mobile Only in Gecko 2.0
Available only in Firefox Mobile as of Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Provides support for creating notification objects, which are used to display desktop notification alerts to the user. Currently, these are only supported on Firefox Mobile and Firefox OS. See Displaying notifications for an example.

The support for this property as been dropped in favor of the standard Notification constructor.

Method overview

notification createNotification(in DOMString title, in DOMString description, in DOMString iconURL Optional);



Creates and returns a notification object that can be used to display the specified message with an optional URL.

notification createNotification(
  in DOMString title,
  in DOMString description,
  in DOMString iconURLOptional


The notification title.
The text to display in the notification.
iconURL Optional
A URL identifying the image to display in the notification.

Return value

A new notification object.


When using notifications in an open web app, be sure to add the desktop-notification permission in your manifest file:

"permissions": {
    "desktop-notification": {}

Usage notes

  • In Firefox 22+ (Firefox OS 1.1+), the instantiation of a new notification should be done with the Notification object by calling new Notification(title, options).
  • Nick Desaulniers has written a Notification shim to cover both newer and older implementations.
  • One particular Firefox OS issue is that you can pass a path to an icon to use in the notification, but if the app is packaged you cannot use a relative path like /my_icon.png. You also can't use navigator.location.origin + "/my_icon.png" because navigator.location.origin is null in packaged apps. The manifest origin field fixes this, but it is only available in Firefox OS 1.1+. A potential solution for supporting Firefox OS <1.1 is to pass an absolute URL to an externally hosted version of the icon. This is less than ideal as the notification is displayed immediately with the icon missing, then the icon is fetched, but it works on all versions of Firefox OS.

See also