GO-V.ORG
As seen in

Search e01

One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.

6 results across 6 corpora for notifications.NotificationOptions.

Developer library 6

notifications

To use this API, you need to have the "notifications" [permission](/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions). ## Types - notifications.NotificationOptions - : Defines the content of a notification. - notifications.TemplateType - : The type of notification. For example, this defines whether the notification can contain an image. ## Functions - notifications.clear() - : Clear a specific

notifications.create()

Creates and displays a notification. Pass a notifications.NotificationOptions to define the notification's content and behavior. You can optionally provide an ID for the notification. If you omit the ID, an ID will be generated. You can use the ID to update or clear the notification. This is an asynchronous function that returns a [`Promise`](/docs/Web/JavaScript/Reference/Global_Objects/Promise). > [!WARNING] >

notifications.getAll()

ntly active notification is a property of this object: the name of the property is the ID of the notification, and the value of the property is a notifications.NotificationOptions object describing that notification. Note that you can define an ID for a notification explicitly by passing it into notifications.create(). If you don't do this, the browser will generate one. Explicitly-specified IDs are strings, but gen

notifications.update()

/Promise). ## Syntax ```js-nolint let updating = browser.notifications.update( id, // string options // NotificationOptions ) ``` ### Parameters - `id` - : `string`. The ID of the notification to update. This is the same as the ID passed into notifications.create()'s callback. - `options` - : notifications.NotificationOptions. Defines the notification's ne

notifications.TemplateType

r types of notification: "basic", "image", "list", "progress". This is passed into notifications.create() and notifications.update() as the `type` property of NotificationOptions. ## Type Values of this type are strings. Possible values are: - `"basic"`: the notification includes: - a title (`NotificationOptions.title`) - a message (`NotificationOptions.message`) - an icon (`NotificationOptions.iconUrl`)

notifications.NotificationOptions

h="96" height="96"…`. Otherwise, the image may not display. _This property is only permitted if `type` is `"image"`. In this case, it is mandatory if the `NotificationOptions` is used in notifications.create(), and optional if it is used in notifications.update()._ - `items` - : `array` of `item`. An array of items to include in the notification. Depending on the settings for the operating system's notificati

JSON results · Services directory