A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.chrome.com/docs/extensions/reference/api/notifications below:

chrome.notifications | API | Chrome for Developers

Skip to main content chrome.notifications

Stay organized with collections Save and categorize content based on your preferences.

Description

Use the chrome.notifications API to create rich notifications using templates and show these notifications to users in the system tray.

Permissions

notifications

Types Properties Properties Properties Enum

"granted"
Specifies that the user has elected to show notifications from the app or extension. This is the default at install time.

"denied"
Specifies that the user has elected not to show notifications from the app or extension.

Enum

"basic"
Contains an icon, title, message, expandedMessage, and up to two buttons.

"image"
Contains an icon, title, message, expandedMessage, image, and up to two buttons.

"list"
Contains an icon, title, message, items, and up to two buttons. Users on Mac OS X only see the first item.

"progress"
Contains an icon, title, message, progress, and up to two buttons.

Methods

clear()

chrome.notifications.clear(
  notificationId: string,
)
: Promise<boolean>

Clears the specified notification.

Parameters

create()

chrome.notifications.create(
  notificationId?: string,
  options: NotificationOptions,
)
: Promise<string>

Creates and displays a notification.

Parameters

getAll()

chrome.notifications.getAll(): Promise<object>

Retrieves all the notifications of this app or extension.

getPermissionLevel()

chrome.notifications.getPermissionLevel(): Promise<PermissionLevel>

Retrieves whether the user has enabled notifications from this app or extension.

update()

chrome.notifications.update(
  notificationId: string,
  options: NotificationOptions,
)
: Promise<boolean>

Updates an existing notification.

Parameters Events

onButtonClicked

chrome.notifications.onButtonClicked.addListener(
  callback: function,
)

The user pressed a button in the notification.

Parameters

onClicked

chrome.notifications.onClicked.addListener(
  callback: function,
)

The user clicked in a non-button area of the notification.

Parameters

onClosed

chrome.notifications.onClosed.addListener(
  callback: function,
)

The notification closed, either by the system or by user action.

Parameters

onPermissionLevelChanged

chrome.notifications.onPermissionLevelChanged.addListener(
  callback: function,
)

The user changes the permission level. As of Chrome 47, only ChromeOS has UI that dispatches this event.

Parameters

onShowSettings

Deprecated since Chrome 65

chrome.notifications.onShowSettings.addListener(
  callback: function,
)

Custom notification settings button is no longer supported.

The user clicked on a link for the app's notification settings. As of Chrome 47, only ChromeOS has UI that dispatches this event. As of Chrome 65, that UI has been removed from ChromeOS, too.

Parameters

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-11 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-11 UTC."],[],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4