JavaScript APIs

alarms

Schedule code to run at a specific time in the future. This is like setTimeout() and setInterval(), except that those functions don't work with background pages that are loaded on demand.

Desktop Mobile
Edge: 0/7 Firefox: 7/7 Chrome: 7/7 Opera: 7/7 Firefox: 7/7

API reference documentation

bookmarks

Interact with the browser's bookmarking system: bookmark pages, retrieve existing bookmarks, edit, remove, and organize bookmarks.

Desktop Mobile
Edge: 0/23 Firefox: 14/23 Chrome: 23/23 Opera: 23/23 Firefox: 0/23

API reference documentation

browserAction

Add a clickable button to the browser's toolbar. You can associated a popup with the button. The popup is specified using HTML, CSS and JavaScript, just like a normal web page. JavaScript running in the popup gets access to all the same WebExtension APIs as your background scripts.

Desktop Mobile
Edge: 0/15 Firefox: 15/15 Chrome: 15/15 Opera: 15/15 Firefox: 0/15

API reference documentation

commands

Define commands and bind them to a keyboard shortcut.

API reference documentation

contextMenus

Add items to the browser's context menu, to be displayed in the contexts you specify. For example, you can show the item only when the user clicks on an image, or on an editable element, or when part of a page is selected.

Desktop Mobile
Edge: 0/9 Firefox: 9/9 Chrome: 9/9 Opera: 9/9 Firefox: 0/9

API reference documentation

cookies

Get and set cookies, and be notified when they change.

Desktop Mobile
Edge: 0/9 Firefox: 9/9 Chrome: 9/9 Opera: 9/9 Firefox: 9/9

API reference documentation

downloads

Interact with the browser's download manager. You can use this module to download files, cancel, pause, resume downloads, and show downloaded files in the file manager.

Desktop Mobile
Edge: 0/27 Firefox: 23/27 Chrome: 27/27 Opera: 27/27 Firefox: 23/27

API reference documentation

events

Common types used by APIs that dispatch events.

Desktop Mobile
Edge: 0/3 Firefox: 0/3 Chrome: 3/3 Opera: 3/3 Firefox: 0/3

API reference documentation

extension

Utilities related to your add-on. Get URLs to resources packages with your add-on, get the Window object for your add-on's pages, get the values for various settings. Note that the messaging APIs in this module are deprecated in favor of the equivalent APIs in the runtime module.

Desktop Mobile
Edge: 0/13 Firefox: 7/13 Chrome: 13/13 Opera: 11/13 Firefox: 7/13

API reference documentation

extensionTypes

Some common types used in other WebExtension APIs.

Desktop Mobile
Edge: 0/4 Firefox: 4/4 Chrome: 4/4 Opera: 3/4 Firefox: 4/4

API reference documentation

i18n

Functions to internationalize your add-on. You can use these APIs to get localized strings from locale files packaged with your add-on, find out the browser's current language, and find out the value of its Accept-Language header.

Desktop Mobile
Edge: 0/5 Firefox: 5/5 Chrome: 5/5 Opera: 4/5 Firefox: 5/5

API reference documentation

idle

Find out when the user's system is idle, locked, or active.

Desktop Mobile
Edge: 0/4 Firefox: 2/4 Chrome: 4/4 Opera: 4/4 Firefox: 1/4

API reference documentation

notifications

Display notifications to the user, using the underlying operating system's notification mechanism. Because this API uses the operating system's notification mechanism, the details of how notifications appear and behave may differ according to the operating system and the user's settings.

Desktop Mobile
Edge: 0/9 Firefox: 8/9 Chrome: 9/9 Opera: 9/9 Firefox: 8/9

API reference documentation

pageAction

A page action is shown as a clickable icon inside the browser's address bar. You can listen for clicks on the icon, or can specify a popup that will open when the icon is clicked. Page actions are for actions that are only relevant to particular pages. If your icon should always be available, use a browser action instead.

Desktop Mobile
Edge: 0/9 Firefox: 9/9 Chrome: 9/9 Opera: 9/9 Firefox: 0/9

API reference documentation

runtime

This module provides information about your add-on and the environment it's running in. It also provides messaging APIs enabling you to: communicate between different parts of your add-on, communicate with other add-ons, and communicate with native applications.

Desktop Mobile
Edge: 0/36 Firefox: 21/36 Chrome: 36/36 Opera: 36/36 Firefox: 21/36

API reference documentation

storage

Enables WebExtensions to store and retrieve data, and listen for changes to stored items.

Desktop Mobile
Edge: 0/11 Firefox: 9/11 Chrome: 11/11 Opera: 9/11 Firefox: 9/11

API reference documentation

tabs

Interact with the browser's tab system. You can use this API to get a list of opened tabs and to create, modify, and rearrange tabs in the browser.

Desktop Mobile
Edge: 0/45 Firefox: 40/45 Chrome: 45/45 Opera: 37/45 Firefox: 0/45

API reference documentation

webNavigation

Get notifications about the various stages of a navigation event.

Desktop Mobile
Edge: 0/13 Firefox: 11/13 Chrome: 13/13 Opera: 13/13 Firefox: 11/13

API reference documentation

webRequest

Add event listeners for the various stages of making an HTTP request. The event listener receives detailed information about the request, and can modify or cancel the request.

Desktop Mobile
Edge: 0/16 Firefox: 15/16 Chrome: 16/16 Opera: 16/16 Firefox: 15/16

API reference documentation

windows

Interact with browser windows. You can use this API to get information about open windows, to open modify, and close windows. You can also listen for window open, close, and activate events.

Desktop Mobile
Edge: 0/16 Firefox: 16/16 Chrome: 16/16 Opera: 16/16 Firefox: 0/16

API reference documentation

Document Tags and Contributors

 Contributors to this page: wbamberg, Sheppy
 Last updated by: wbamberg,