Gecko Firefox

After a decade-long run, Camino is no longer being developed, and we encourage all users to upgrade to a more modern browser. Camino is increasingly lagging behind the fast pace of changes on the web, and more importantly it is not receiving security updates, making it increasingly unsafe to use.

Driver

Fortunately, Mac users have many more browsers to choose from than they did when Camino started ten years ago. Former Camino developers have helped build the three most popular – Chrome, Firefox, and Safari – so while this is the end of Camino itself, the community that helped build it is still making the web better for Mac users.

Thank you to all our loyal users, and to everyone who contributed in countless ways over the years to make Camino what it was.

  • Think of it as harnessing the full power of Gecko (the engine that powers Firefox), while its API is WebView-like and easy to use. Suited for apps and browsers: GeckoView is particularly suited for building mobile browsers, but it can be embedded as a web engine component in any kind of app.
  • The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information. Note: This will cause you to lose any Extensions, Open websites, and some Preferences. To Reset Firefox do the following: Go to Firefox Help Troubleshooting Information. Click the 'Reset Firefox' button.

Firefox User Agent Strings Firefox Click on any string to get more details Firefox 77.0. Mozilla/5.0 (Windows NT 6.1; WOW64; rv:77.0) Gecko/20190101 Firefox/77.0.

Secure context

This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The Notification interface of the Notifications API is used to configure and display desktop notifications to the user. These notifications' appearance and specific functionality vary across platforms but generally they provide a way to asynchronously provide information to the user.

Constructor

Notification()
Creates a new instance of the Notification object.

Properties

Static properties

These properties are available only on the Notification object itself.

Notification.permissionRead only

Gecko Driver For Firefox

A string representing the current permission to display notifications. Possible values are:
  • denied — The user refuses to have notifications displayed.
  • granted — The user accepts having notifications displayed.
  • default — The user choice is unknown and therefore the browser will act as if the value were denied.
Notification.maxActionsRead only

Instance properties

Gecko Firefox Latest

These properties are available only on instances of the Notification object.

Notification.actionsRead only
The actions array of the notification as specified in the constructor's options parameter.
Notification.badgeRead only
The URL of the image used to represent the notification when there is not enough space to display the notification itself.
Notification.bodyRead only
The body string of the notification as specified in the constructor's options parameter.
Notification.dataRead only
Returns a structured clone of the notification’s data.
Notification.dirRead only
The text direction of the notification as specified in the constructor's options parameter.
Notification.langRead only
The language code of the notification as specified in the constructor's options parameter.
Notification.tagRead only
The ID of the notification (if any) as specified in the constructor's options parameter.
Notification.iconRead only
The URL of the image used as an icon of the notification as specified in the constructor's options parameter.
Notification.imageRead only
The URL of an image to be displayed as part of the notification, as specified in the constructor's options parameter.
Notification.renotifyRead only
Specifies whether the user should be notified after a new notification replaces an old one.
Notification.requireInteractionRead only
A Boolean indicating that a notification should remain active until the user clicks or dismisses it, rather than closing automatically.
Notification.silentRead only
Specifies whether the notification should be silent — i.e., no sounds or vibrations should be issued, regardless of the device settings.
Notification.timestampRead only
Specifies the time at which a notification is created or applicable (past, present, or future).
Notification.titleRead only
The title of the notification as specified in the first parameter of the constructor.
Notification.vibrateRead only
Specifies a vibration pattern for devices with vibration hardware to emit.

Event handlers

Notification.onclick
A handler for the click event. It is triggered each time the user clicks on the notification.
Notification.onclose
A handler for the close event. It is triggered when the user closes the notification.
Notification.onerror
A handler for the error event. It is triggered each time the notification encounters an error.
Notification.onshow
A handler for the show event. It is triggered when the notification is displayed.

Methods

Static methods

Gecko Firefox Download

These methods are available only on the Notification object itself.

Notification.requestPermission()
Requests permission from the user to display notifications.
Gecko Firefox

Instance methods

These properties are available only on an instance of the Notification object or through its prototype. The Notification object also inherits from the EventTarget interface.

Notification.close()
Programmatically closes a notification instance.

Gecko Firefox Mac

Gecko

Examples

Assume this basic HTML:

It's possible to send a notification as follows — here we present a fairly verbose and complete set of code you could use if you wanted to first check whether notifications are supported, then check if permission has been granted for the current origin to send notifications, then request permission if required, before then sending a notification.

We no longer show a live sample on this page, as Chrome and Firefox no longer allow notification permissions to be requested from cross-origin <iframe>s, with other browsers to follow. To see a example in action, check out our To-do list example (also see the app running live.)

Note: In the above example we spawn notifications in response to a user gesture (clicking a button). This is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward browsers will explicitly disallow notifications not triggered in response to a user gesture. Firefox is already doing this from version 72, for example.

Specifications

SpecificationStatusComment
Notifications APILiving StandardLiving standard

Browser compatibility

BCD tables only load in the browser

See also