MDN’s new design is in Beta! A sneak peek: https://blog.mozilla.org/opendesign/mdns-new-design-beta/

Found 882 pages:

# Page Tags and summary
1 Add-ons Add-ons, Extension, Extensions, Landing, Mozilla
Add-ons allow developers to extend and modify the functionality of Firefox.
2 Add-on Debugger Advanced, Debugging, Developer, Firefox, Guide, Howto, JavaScript, add-on
The Add-on Debugger lets you run a subset of the Firefox developer tools in the context of your add-on:
3 Add-on Manager Add-on Manager, Add-ons, Guide
4 Addon Add-on Manager, Add-ons, Extensions, Guide, NeedsContent
5 AddonAuthor Add-on Manager, Add-ons
6 AddonInstall Add-on Manager, Add-ons, Extensions, Reference, Référence
7 AddonListener Add-on Manager, Add-ons, Reference, Référence
8 AddonManager Add-on Manager, Add-ons, Interfaces, Interfaces:Scriptable, Reference, Référence
9 AddonScreenshot Add-on Manager, Add-ons
10 AddonType
11 AddonUpdateChecker Add-on Manager, Add-ons, Reference, Référence
12 Code Samples Add-on Manager, Add-ons, Examples
If you need to determine the directory in which your add-on is installed, code like the following will do the trick. Simply replace YOUREXTENSIONID with your add-on's ID.
13 InstallListener Add-on Manager, Add-ons, Reference, Référence
14 TypeListener
15 UpdateCheckListener Add-on Manager, Add-ons, Method, Reference, Référence
16 UpdateInfo Add-on Manager, Add-ons, Property, Reference, Référence
17 UpdateListener Add-on Manager, Add-ons, Extensions, Method, Reference, Référence
18 Add-on Repository AMO, Add-on Manager, Add-ons
19 SearchCallback Add-on Manager, Add-ons
20 Add-on SDK Add-on SDK, Jetpack
Using the Add-on SDK, you can create Firefox add-ons. You can use various standard Web technologies: JavaScript, HTML, and CSS, to create the add-ons. The SDK includes JavaScript APIs, which you can use to create add-ons and tools for creating, running, testing, and packaging add-ons.
21 Builder
The Add-on Builder was a web-based development environment that allowed developers to create add-ons using the SDK APIs, but without needing to use the jpm command line tool. It was retired on April 1, 2014, and the "builder.addons.mozilla.org" domain now redirects to this page.
22 Guides Add-on SDK
This page lists more theoretical in-depth articles about the SDK.
23 Content Scripts Add-on SDK
Many add-ons need to access and modify the content of web pages. But the main add-on code doesn't get direct access to web content. Instead, SDK add-ons need to factor the code that gets access to web content into separate scripts that are called content scripts. This page describes how to develop and implement content scripts.
24 Communicating With Other Scripts
This section of the guide explains how content scripts can communicate with:
25 Communicating using "port"
To enable add-on scripts and content scripts to communicate with each other, each end of the conversation has access to a port object.
26 Communicating using "postMessage" Add-on SDK
As an alternative to port, content modules support the built-in message event. In most cases port is preferable to message events. However, the context-menu module does not support port, so to send messages from a content script to the add-on via a context menu object, you must use message events.
27 Cross-domain Content Scripts Add-on SDK, Add-ons, Extensions
By default, content scripts don't have any cross-domain privileges. In particular, they can't:
28 Interacting with page scripts Add-on SDK, Add-ons, Extensions
By default, content scripts loaded by add-ons and scripts loaded by web pages are insulated from each other:
29 Loading Content Scripts
The constructors for content-script-using objects such as panel and page-mod define a group of options for loading content scripts:
30 Reddit Example Advanced, CodingScripting, JavaScript, Mobile
This example add-on creates a panel containing the mobile version of Reddit. When the user clicks on the title of a story in the panel, the add-on opens the linked story in a new tab in the main browser window.
31 port
This article documents the port object, which is used to communicate between a content script and the main add-on code.
32 self
This article documents the self object that is available as a global in content scripts. self provides:
33 Contributor's Guide
No summary!
34 Classes and Inheritance Add-on SDK
A class is a blueprint from which individual objects are created. These individual objects are the instances of the class. Each class defines one or more members, which are initialized to a given value when the class is instantiated. Data members are properties that allow each instance to have their own state, whereas member functions are properties that allow instances to have behavior. Inheritance allows classes to inherit state and behavior from an existing classes, known as the base class. Unlike languages like C++ and Java, JavaScript does not have native support for classical inheritance. Instead, it uses something called prototypal inheritance. As it turns out, it is possible to emulate classical inheritance using prototypal inheritance, but not without writing a significant amount of boilerplate code.
35 Content Processes Add-on SDK
A content process was supposed to run all the code associated with a single tab. Conversely, an add-on process was supposed to run all the code associated with a single add-on. Neither content or add-on proceses were ever actually implemented, but by the time they were cancelled, the SDK was already designed with them in mind. To understand this article, it's probably best to read it as if content and add-on processes actually exist.
36 Getting Started Add-on SDK
Learn how to contribute to the Add-on SDK.
37 Modules Add-ons, Extensions
A module is a self-contained unit of code, which is usually stored in a file, and has a well defined interface. The use of modules greatly improves the maintainability of code, by splitting it up into independent components, and enforcing logical boundaries between them. Unfortunately, JavaScript does not yet have native support for modules: it has to rely on the host application to provide it with functionality such as loading subscripts, and exporting/ importing names. We will show how to do each of these things using the built-in Components object provided by Xulrunner application such as Firefox and Thunderbird.
38 Private Properties
People have come up with several ways to emulate private properties using existing language features. This article discusses two common techniques: one using prefixes, the other closures.
39 Firefox Compatibility Add-on SDK
No summary!
40 Module structure of the SDK Add-on SDK
CommonJS is the underlying infrastructure for both the SDK and the add-ons you build using the SDK. A CommonJS module is a piece of reusable JavaScript: it exports certain objects which are thus made available to dependent code. CommonJS defines:
41 Multiprocess Firefox and the SDK Firefox OS, Guide, SDK
This article explains how developers can test whether SDK-based add-ons are compatible with multiprocess Firefox, and how to fix them if they are not.
42 Porting the Library Detector Add-on SDK, Add-ons, Example, Extensions, Sample code, Tutorial
This example walks through the process of porting a XUL-based add-on to the SDK. It's a very simple add-on and a good candidate for porting because there are suitable SDK APIs for all its features.
43 Program ID
The Program ID is a unique identifier for your add-on. When you package your add-on for distribution using jpm xpi, it will become the ID field in the add-on's Install Manifest.
44 SDK API Lifecycle
Developers using the SDK's APIs need to know how far they can trust that a given API will not change in future releases. At the same time, developers maintaining and extending the SDK's APIs need to be able to introduce new APIs that aren't yet fully proven, and to retire old APIs when they're no longer optimal or supported by the underlying platform.
45 SDK and XUL Comparison
That's not the whole story. If you need more flexibility than the SDK's High-Level APIs provide, you can use its Low-level APIs to load XPCOM objects directly or to manipulate the DOM directly as in a traditional bootstrapped extension.
46 Testing the Add-on SDK Add-on SDK, CFX, JPM, SDK
With a checkout of the mozilla/addon-sdk repository (or a checkout of the m-c repo and cd into the addon-sdk/source directory) there are many means to run the addon-sdk tests.
47 Two Types of Scripts
On the web, JavaScript executes in the context of a web page, and has access to that page's DOM content. This enables you to call functions like:
48 Working with Events
The Add-on SDK supports event-driven programming.
49 XUL Migration Guide
This guide aims to help you migrate a XUL-based add-on to the SDK.
50 High-Level APIs Add-on SDK
Modules listed on this page implement high-level APIs for building add-ons: creating user interfaces, interacting with the web, and interacting with the browser.
51 addon-page Add-on SDK, Add-ons, Extensions, Reference, Référence
Create a page that does not contain navigational elements.
52 base64 Add-on SDK
Data encoding and decoding using Base64 algorithms.
53 clipboard Add-on SDK
Interact with the system clipboard, setting and getting its contents.
54 context-menu Add-on SDK, Add-ons, Extensions, Firefox, SDK
Adds items, submenus, and menu separators to the page's context menu.
55 hotkeys Add-on SDK
Assign hotkey combinations to functions in your add-on.
56 indexed-db Add-on SDK
Exposes the IndexedDB API to add-ons.
57 l10n Add-on SDK
Localize strings appearing in the add-on's JavaScript code.
58 notifications Add-on SDK, Notifications
Display transient, toaster-style desktop messages to the user.
59 page-mod Add-on SDK
Run scripts in the context of web pages whose URL matches a given pattern.
60 page-worker Add-on SDK
Create a permanent, invisible page and access its DOM.
61 panel Add-on SDK, Add-ons, Extensions
Creates transient dialogs to implement part of an add-on's user interface.
62 passwords Add-on SDK
Interact with Firefox's Password Manager to add, retrieve and remove stored credentials.
63 private-browsing Add-on SDK
Check whether a given object is private, so an add-on can respect private browsing
64 querystring Add-on SDK
Utility functions for working with query strings.
65 request NeedsUpdate, SDK, add-on
Make simple network requests.
66 selection Add-on SDK
Get and set text and HTML selections in the current web page.
67 self Add-on SDK
Access data that is bundled with the add-on, and add-on metadata.
68 simple-prefs Add-on SDK
Store preferences across application restarts.
69 simple-storage Add-on SDK, Add-ons, Reference, Référence
Lets an add-on store data so that it's retained across Firefox restarts.
70 system Add-on SDK
Query the add-on's environment and access arguments passed to it.
71 tabs Add-on SDK
Open, manipulate, and access tabs, and receive tab events.
72 timers Add-on SDK
Set one-off and periodic timers.
73 ui Add-on SDK, Add-ons, Extensions, Reference
Provides access to button, toolbar, and sidebar UI objects.
74 url Add-on SDK
Construct, validate, and parse URLs.
75 webextension
Provides functions for communicating with an embedded WebExtension.
76 widget Add-on SDK
Create a simple user interface for an add-on in Firefox's add-on bar.
77 windows Add-on SDK
Enumerate and examine open browser windows, open new windows, and listen for window events.
78 Low-Level APIs
Modules in this section implement low-level APIs. These modules fall roughly into three categories:
79 /loader
Create CommonJS module loaders.
80 chrome
The chrome module gives an Add-on SDK add-on access to the Components object, which in turn gives it access to a large set of privileged low-level Firefox APIs.
81 console/plain-text
Constructor for a console instance.
82 console/traceback
Functionality similar to Python's traceback module.
83 content/content
Re-exports three objects from three other modules: Loader, Worker, and Symbiont.
84 content/loader
Provides one of the building blocks for those modules that use content scripts to interact with web content, such as panel and page-mod.
85 content/mod
Provides functions to modify a page content.
86 content/symbiont
Used by SDK modules that can load web content and attach content scripts to it.
87 content/worker
Used in the internal implementation of SDK modules which use content scripts to interact with web content.
88 core/heritage
Helper functions for inheritance.
89 core/namespace
Provides an API for creating namespaces for objects, which effectively may be used for creating fields that are not part of objects public API.
90 core/promise
Implementation of promises to make asynchronous programming easier.
91 dev/panel
Enables you to extend the Firefox Developer Tools.
92 event/core
The event/core module allows the creation of APIs to broadcast and subscribe to events.
93 event/target
Create objects that broadcast events.
94 frame/hidden-frame
Creates Firefox frames (i.e. XUL <iframe> elements) that are not displayed to the user.
95 frame/utils
Provides helper functions for working with platform internals like frames and browsers.
96 fs/path
Provides access to the local filesystem with the NodeJS path module API.
97 io/byte-streams
Provides streams for reading and writing bytes.
98 io/file
Provides access to the local filesystem.
99 io/text-streams
Provides streams for reading and writing text.
100 lang/functional
Functional helper methods.
101 lang/type
Functions for working with type detection.
102 loader/cuddlefish Add-on SDK, CFX
The SDK's module loader.
103 loader/sandbox
Create JavaScript sandboxes and execute scripts in them.
104 net/url
Enables you to read content from a URI.
105 net/xhr
Provides access to XMLHttpRequest functionality.
106 places/bookmarks
Create, modify, and retrieve bookmarks.
107 places/favicon
Helper functions for working with favicons.
108 places/history
Access the user's browsing history.
109 platform/xpcom
Implement XPCOM objects, factories, and services.
110 preferences/event-target Add-on SDK
Listen to changes to the Preferences system in Firefox.
111 preferences/service Add-on SDK, Jetpack, SDK
Access the Preferences system in Firefox.
112 remote/child Module, Reference, Référence, SDK
Enables an SDK module loaded into a child process to access web content in the child process and communicate with modules in the main process.
113 remote/parent Reference, Référence, SDK
Enables you to load modules, and privileged parts of your add-on in general, into child processes.
114 stylesheet/style
Modify styles using stylesheet files or CSS rules.
115 stylesheet/utils
Helper functions for working with stylesheets.
116 system/child_process
An implementation of the node.js child_process API.
117 system/environment
Access, set and clear environment variables.
118 system/events
API for working with the application observer service.
119 system/runtime
Access to information about Firefox's runtime environment.
120 system/unload
Register callbacks that are called when a module is unloaded.
121 system/xul-app
Information about the application on which your add-on is running.
122 tabs/utils
Functions for working with XUL tabs and the XUL tabbrowser object.
123 test/assert Add-on SDK, JPM
Implements the assert interface defined in the CommonJS Unit Testing specification version 1.1.
124 test/harness
Test harness setup and execution.
125 test/httpd
An HTTP server for the Mozilla platform, which can be used in unit tests.
126 test/runner
Sets up unit tests.
127 test/utils
Helper methods used in the CommonJS Unit Testing suite.
128 ui/button/action
Add a button to the Firefox user interface.
129 ui/button/toggle
Add a toggle button to the Firefox user interface.
130 ui/frame
Create HTML iframes, using bundled HTML, CSS and JavaScript, that can be added to a designated area of the Firefox user interface.
131 ui/id
Create UI component IDs.
132 ui/sidebar
Enables you to create sidebars.
133 ui/toolbar
Add a toolbar to the Firefox user interface.
134 util/array
Helper functions for working with arrays.
135 util/collection
A simple list-like class and utilities for using it.
136 util/deprecate
Functions to deprecate code.
137 util/list
Building blocks for composing lists.
138 util/match-pattern
Test strings containing URLs against simple patterns.
139 util/object
Functions for working with objects.
140 util/uuid
Generate or parse UUIDs.
141 window/utils
Functions for working with browser windows.
142 Release notes Add-on SDK
GitHub commits made between Firefox 34 and Firefox 35. This will not include any uplifts made after this release entered Aurora.
143 Tools Add-on SDK, CFX, JPM
Articles listed here provide a reference for the SDK's tools:
144 cfx Add-on SDK, CFX
Enables you to test, run, and package add-ons. cfx is is no longer supported as of Firefox 44 and no longer accepted for add-on submission, jpm should now be used instead.
145 cfx to jpm CFX, JPM, SDK, add-on
A guide to working with jpm if you're already familiar with cfx.
146 console Add-on SDK
Enables your add-on to log error, warning or informational messages.
147 jpm Add-on SDK, JPM
jpm is a command-line tool that enables you to test, run, and package add-ons.
148 jpm-mobile ADB, Add-ons, JPM, Mobile, Testing, travis-ci
The Node-based replacement for cfx --force-mobile. Enables you to run and test add-ons for Firefox Mobile (aka Fennec).
149 jpmignore JPM
Use .jpmignore to ignore files from your XPI builds created via jpm.
150 package.json CommonJS, JPM, SDK, add-on, package.json
The package.json file contains manifest data for your add-on, providing not only descriptive information about the add-on for presentation in the Add-ons Manager, but other metadata required of add-ons.
151 Tutorials Add-on SDK
This page lists practical hands-on articles about how to accomplish specific tasks using the SDK.
152 Add a Context Menu Item Add-on SDK, Firefox, Guide
To add items and submenus to the Firefox context menu, use the context-menu module.
153 Add a Menu Item to Firefox Add-on SDK
The SDK doesn't provide a built-in API to add new menu items to Firefox. But it's extensible by design, so anyone can build and publish modules for add-on developers to use.
154 Adding a Button to the Toolbar Add-on SDK
To add a button to the toolbar, use the action button or toggle button modules.
155 Annotator Add-on SDK
In this tutorial we'll build an add-on that uses many of the SDK's high-level APIs.
156 Creating annotations Add-on SDK, Add-ons, Beginner, Extensions, Tutorial
We'll use two objects to create annotations: a page-mod to find page elements that the user can annotate, and a panel for the user to enter the annotation text itself.
157 Displaying annotations Add-on SDK
In this chapter we'll use a page-mod to locate elements of web pages that have annotations associated with them, and a panel to display the annotations.
158 Implementing the widget Add-on SDK, Add-ons, Beginner, Extensions, Tutorial
We want the widget to do two things:
159 Overview Add-on SDK
The annotator uses content scripts to build user interfaces, get user input, and examine the DOM of pages loaded by the user.
160 Storing annotations Add-on SDK
Now we are able to create annotations, let's store them using the simple-storage module. In this chapter we will cover three topics relating to persistent storage:
161 Chrome Authority
The most powerful low-level modules are run with "chrome privileges", which gives them access to the infamous Components object, which grants unfettered access to the host system. From this, the module can do pretty much anything the browser is capable of. To obtain these privileges, the module must declare its intent with a statement like the following:
162 Creating Event Targets
This tutorial describes the use of low-level APIs. These APIs are still in active development, and we expect to make incompatible changes to them in future releases.
163 Creating Reusable Modules Add-on SDK
With the SDK you don't have to keep all your add-on in a single "index.js" file. You can split your code into separate modules with clearly defined interfaces between them. You then import and use these modules from other parts of your add-on using the require() statement, in exactly that same way that you import core SDK modules like page-mod or panel.
164 Developing for Firefox Mobile Add-on SDK
Firefox for Android implements its UI using native Android widgets instead of XUL. With the add-on SDK you can develop add-ons that run on this new version of Firefox Mobile as well as on the desktop version of Firefox.
165 Display a Popup Add-on SDK
To display a popup dialog, use the panel module. A panel's content is defined using HTML. You can run content scripts in the panel: although the script running in the panel can't directly access your main add-on code, you can exchange messages between the panel script and the add-on code.
166 Getting Started (jpm) Add-on SDK, JPM
In this tutorial we've built and packaged an add-on using three commands:
167 Getting started (cfx)
In this tutorial we've built and packaged an add-on using three commands:
168 List Open Tabs Add-on SDK
To list the open tabs, you can iterate over the tabs object itself.
169 Listen for Page Load Add-on SDK
You can get notifications about new pages loading using the tabs module. The following add-on listens to the tab's built-in ready event and just logs the URL of each tab as the user loads it:
170 Listening for Load and Unload
If your add-on exports a function called main(), then that function will be called whenever the add-on is loaded, and it will be passed an object containing a string describing the reason it was loaded as well as any arguments passed to it. If your add-on exports a function called onUnload(), then that function will be called when the add-on is unloaded, and it will be passed a string describing the reason it was unloaded.
171 Localization Add-on SDK, Localization
The SDK supports localization of strings appearing in:
172 Logging Add-on SDK
The DOM console object is useful for debugging JavaScript. Because DOM objects aren't available to the main add-on code, the SDK provides its own global console object with most of the same methods as the DOM console, including methods to log error, warning, or informational messages. You don't have to require() anything to get access to the console. It is automatically made available to you.
173 Modifying Web Pages Based on URL Add-on SDK
To modify any pages that match a particular pattern (for example, "http://example.org/") as they are loaded, use page-mod module.
174 Modifying the Page Hosted by a Tab Add-on SDK
To modify the page hosted by a particular tab, load one or more content scripts into it using attach() method of tab object. The job of these scripts is to interact with web content.
175 Open a Web Page Add-on SDK
To open a new web page, you can use the tabs module:
176 Troubleshooting
If you're having trouble getting the Add-on SDK up and running, don't panic! This page lists some starting points that might help you track down your problem.
177 Unit Testing Add-on SDK, JPM
The SDK provides a framework to help create and run unit tests for your code. To demonstrate how it works we'll write some unit tests for a simple Base64 encoding module.
178 Using XPCOM without chrome Bookmarks, Chrome, SDK, XPCOM
With the low-level module sdk/platform/xpcom , it's possible to exclude chrome and XPCOMUtils in some cases.
Below is an example for the XPCOM bookmark observer.
179 Using third-party modules (jpm) Addon-SDK, JPM
First, while in the root of your add-on, install the package that contains the modules you want to use:
180 Adding extensions using the Windows registry Add-ons, Extensions, Installing, Mozilla, Registry, Windows, Windows Registry
This document explains how to "install" Firefox and Thunderbird extensions using the Windows Registry. This mechanism is designed to make it easier for third-party installers to register extensions with Firefox and Thunderbird.
181 Bootstrapped extensions Add-ons, Extensions, Firefox 4, Gecko 2.0, Guide, Localization
Traditional extensions include overlays, wherein the application can load up XUL from the extension's package and automatically apply it on top its own UI. While this makes creating extensions that add to the application's user interface relatively easy, it means that updating, installing, or disabling an extension requires an application restart.
182 Browser extensions Add-ons, Landing, WebExtensions
Extensions can extend and modify the capability of a browser. Extensions for Firefox are built using WebExtension APIs, a cross-browser system for developing extensions. To a large extent the system is compatible with the extension API supported by Google Chrome and Opera. Extensions written for these browsers will in most cases run in Firefox or Microsoft Edge with just a few changes. The API is also fully compatible with multiprocess Firefox.
183 Add a button to the toolbar WebExtensions
Toolbar buttons are one of the main UI components available to extensions. Toolbar buttons live in the main browser toolbar and contain an icon. When the user clicks the icon, one of two things can happen:
184 Alternative distribution options Installation, Landing, WebExtensions, add-on
The standard add-on distribution and installation process is through Firefox using a signed XPI file obtained from addons.mozilla.org (AMO) (for listed add-ons) or a download set up by a developer (for unlisted add-ons).
185 Add-ons for desktop apps Add-ons, Desktop apps, Guide, Installation, WebExtensions
If you have developed an add-on to complement a desktop application, there are several ways you can install the add-on:
186 Add-ons in the enterprise Add-ons, Guide, Installation
As an enterprise IT administrator you may wish to install add-ons for your users automatically, this page discusses the options.
187 Sideloading add-ons Guide, Installation, Sideloading, WebExtensions
You may want to send a user your add-on’s XPI file by some means other than a web download, such as an email distribution of a beta version for user testing. In this case, there are two practical options for installing the add-on:
188 Anatomy of an extension WebExtensions
An extension consists of a collection of files, packaged for distribution and installation. In this article, we will quickly go through the files that might be present in an extension.
189 Browser actions WebExtensions
A browser action is a button you can add to the browser toolbar. Users can click the button to interact with your extension.
190 Browser compatibility for manifest.json Add-ons, WebExtensions, manifest.json
No summary!
191 Browser support for JavaScript APIs WebExtensions
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
192 Chrome incompatibilities WebExtensions
Extensions built with WebExtension APIs are designed to be compatible with Chrome and Opera extensions: as far as possible, extensions written for those browsers should run on Firefox with minimal changes.
193 Comparison with XUL/XPCOM extensions WebExtensions
At a very basic level, XUL/XPCOM extensions are similar to extensions developed with WebExtensions. They both include:
194 Comparison with the Add-on SDK WebExtensions
The basic structure and concepts of the Add-on SDK are shared by WebExtensions. Both technologies include:
195 Content Security Policy WebExtensions
Content Security Policy (CSP) is a mechanism to help prevent websites from inadvertantly executing malicious content. A website specifies a CSP using an HTTP header sent from the server. The CSP is mostly concerned with specifying legitimate sources of various types of content, such as scripts or embedded plugins. For example, a website can use it to specify that the browser should only execute JavaScript served from the website itself, and not from any other sources. A CSP can also instruct the browser to disallow potentially unsafe practices, such as the use of eval().
196 Content scripts WebExtensions
A content script is a part of your extension that runs in the context of a particular web page (as opposed to background scripts which are part of the extension, or scripts which are part of the web site itself, such as those loaded using the <script> element).
197 Debugging WebExtensions
This article explains how you can use the Firefox developer tools to debug extensions built with WebExtension APIs.
198 Debugging (before Firefox 50)
This article explains how you can use the built-in Firefox developer tools to debug extensions developed with WebExtension APIs. If you're trying to debug an add-on developed with the Add-on SDK, please see the guide to the Add-on Debugger.
199 Developing extensions for Firefox for Android Beginner, Guide, Mobile, WebExtensions
You will approach the coding of an extension for Firefox for Android in the same way as you would for a desktop extension using WebExtension APIs; using a text editor or tool of your choice to write the code. However, when you get to testing and debugging your extension you need to follow a different process, this article walks you through that process.
200 Differences between desktop and Android extensions Guide, Mobile, WebExtensions
Firefox for Android offers a subset of the WebExtensions APIs available to the desktop version of Firefox. Some of these differences are due to the nature of the Android environment and therefore the features Firefox can implement, others are where Firefox for Android does not yet offer all the desktop features. This article describes and explains these differences and looks at the impact they might have on your add-on development.
201 Embedded WebExtensions WebExtensions
Starting in Firefox 51, you can embed a WebExtension in a classic bootstrapped extension or an Add-on SDK add-on.
202 Example extensions WebExtensions
To help illustrate how to develop extensions, we maintain a repository of simple example extensions at https://github.com/mdn/webextensions-examples. This article describes the WebExtension APIs used in that repository.
203 Extending the developer tools
You can use WebExtensions APIs to extend the browser's built-in developer tools. To create a devtools extension, include the "devtools_page" key in manifest.json:
204 Extensions and the add-on ID WebExtensions
Firefox add-ons contain a unique identifier which is used both inside Firefox itself and on the addons.mozilla.org (AMO) website. For example, it's used by Firefox to check for updates to installed add-ons and to identify which objects (such as data stores) are controlled by this add-on.
205 Getting started with web-ext Guide, Installing, Testing, Tools, WebExtension, packaging, web-ext
web-ext is a command line tool designed to speed up various parts of the extension development process, making development faster and easier. This article explains how to install and use web-ext.
206 Implement a settings page WebExtensions
A settings page gives users a way to see and change settings (sometimes also called "preferences" or "options") for the extension.
207 Interact with the clipboard WebExtensions
Extensions built using WebExtension APIs can interact with the system clipboard using document.execCommand():
208 Intercept HTTP requests Add-ons, Extensions, How-to, WebExtensions
To intercept HTTP requests, use the webRequest API. This API enables you to add listeners for various stages of making an HTTP request. In the listeners, you can:
209 Internationalization Article, Guide, Internationalization, Localization, WebExtensions, i18n, messages.json, placeholders, predefined messages
The WebExtensions API has a rather handy module available for internationalizing extensions — i18n. In this article we'll explore its features and provide a practical example of how it works. The i18n system for extensions built using WebExtension APIs is similar to common JavaScript libraries for i18n such as i18n.js.
210 JavaScript APIs WebExtensions
No summary!
211 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.
212 alarms.Alarm API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, alarm, alarms
Information about a single alarm. This object is returned from alarms.get() and alarms.getAll(), and is passed into the alarms.onAlarm listener.
213 alarms.clear() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, alarms, clear
Cancels an alarm, given its name.
214 alarms.clearAll() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, alarms, clearAll
Cancels all active alarms.
215 alarms.create() API, Add-ons, Create, Extensions, Method, Non-standard, Reference, WebExtensions, alarms
Creates a new alarm.
216 alarms.get() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, alarms, get
Gets an alarm, given its name.
217 alarms.getAll() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, alarms, getAll
Gets all active alarms for the extension.
218 alarms.onAlarm API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, alarms, onAlarm
Fired when any alarm set by the extension goes off.
219 bookmarks API, Add-ons, Bookmarks, Extensions, Interface, Non-standard, Reference, WebExtensions
The WebExtensions bookmarks API lets an extension interact with and manipulate the browser's bookmarking system. You can use it to bookmark pages, retrieve existing bookmarks, and edit, remove, and organize bookmarks.
220 bookmarks.BookmarkTreeNode API, Add-ons, BookmarkTreeNode, Bookmarks, Extensions, Non-standard, Reference, Type, WebExtensions
An object of type bookmarks.BookmarkTreeNode represents a node in the bookmark tree, where each node is a bookmark or bookmark folder. Child nodes are ordered by an index within their respective parent folders.
221 bookmarks.BookmarkTreeNodeUnmodifiable API, Add-ons, BookmarkTreeNodeUnmodifiable, Bookmarks, Extensions, Non-standard, Reference, Type, WebExtensions
The bookmarks.BookmarkTreeNodeUnmodifiable type is used to indicate the reason that a node in the bookmark tree (where each node is either a bookmark or a bookmark folder) cannot be changed. This is used as the value of the bookmarks.BookmarkTreeNode.unmodifiable.unmodifiable field on bookmark nodes.
222 bookmarks.CreateDetails API, Add-ons, Bookmarks, CreateDetails, Extensions, Non-standard, Reference, Type, WebExtensions
The CreateDetails type is used to describe the properties of a new bookmark or bookmark folder when calling the bookmarks.create() method.
223 bookmarks.create() API, Add-ons, Bookmarks, Create, Extensions, Method, Non-standard, Reference, WebExtensions
Creates a bookmark or folder as a child of the BookmarkTreeNode with the specified parentId. To create a folder, omit or leave empty the CreateDetails.url parameter.
224 bookmarks.get() API, Add-ons, Bookmarks, Extensions, Method, Non-standard, Reference, WebExtensions, get
Given the ID of a bookmarks.BookmarkTreeNode or an array of such IDs, the bookmarks.get() method retrieves the matching nodes.
225 bookmarks.getChildren() API, Add-ons, Bookmarks, Extensions, Method, Non-standard, Reference, WebExtensions, getChildren
bookmarks.getChildren() retrieves all the immediate children of a given bookmark folder, identified as a BookmarkTreeNode ID.
226 bookmarks.getRecent() API, Add-ons, Bookmarks, Extensions, Method, Non-standard, Reference, WebExtensions, getRecent
The bookmarks.getRecent() method retrieves a specified number of the most recently added bookmarks as an array of BookmarkTreeNode objects.
227 bookmarks.getSubTree() API, Add-ons, Bookmarks, Extensions, Method, Non-standard, Reference, WebExtensions, getSubTree
The bookmarks.getSubTree() method asynchronously retrieves a bookmarks.BookmarkTreeNode, given its ID.
228 bookmarks.getTree() API, Add-ons, Bookmarks, Extensions, Method, Non-standard, Reference, WebExtensions, getTree
bookmarks.getTree() returns an array containing the root of the bookmarks tree as a bookmarks.BookmarkTreeNode object.
229 bookmarks.move() API, Add-ons, Bookmarks, Extensions, Method, Non-standard, Reference, WebExtensions, move
The bookmarks.move() method moves the specified BookmarkTreeNode to the specified destination within the tree of bookmarks. This lets you move a bookmark to a new folder and/or position within the folder.
230 bookmarks.onChanged API, Add-ons, Bookmarks, Event, Extensions, Non-standard, Reference, WebExtensions, onChanged
Fired when there is a change to:
231 bookmarks.onChildrenReordered API, Add-ons, Bookmarks, Event, Extensions, Non-standard, Reference, WebExtensions, onChildrenReordered
Fired when the children of a folder have changed their order due to the order being sorted in the UI. This is not called as a result of a call to bookmarks.move() or a drag operation in the UI.
232 bookmarks.onCreated API, Add-ons, Bookmarks, Event, Extensions, Non-standard, Reference, WebExtensions, onCreated
Fired when a bookmark item (a bookmark or a folder) is created.
233 bookmarks.onImportBegan API, Add-ons, Bookmarks, Event, Extensions, Non-standard, Reference, WebExtensions, onImportBegan
Fired when the browser has started importing a set of bookmarks.
234 bookmarks.onImportEnded API, Add-ons, Bookmarks, Event, Extensions, Non-standard, Reference, WebExtensions, onImportEnded
Fired when the browser has finished importing a set of bookmarks.
235 bookmarks.onMoved API, Add-ons, Bookmarks, Event, Extensions, Non-standard, Reference, WebExtensions, onMoved
Fired when a bookmark or folder is moved to a different parent folder and/or position within a folder.
236 bookmarks.onRemoved API, Add-ons, Bookmarks, Event, Extensions, Non-standard, Reference, WebExtensions, onRemoved
Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents.
237 bookmarks.remove() API, Add-ons, Bookmarks, Extensions, Method, Non-standard, Reference, WebExtensions, remove
The bookmarks.remove() method removes a single bookmark or an empty bookmark folder.
238 bookmarks.removeTree() API, Add-ons, Bookmarks, Extensions, Method, Non-standard, Reference, WebExtensions, removeTree
The bookmarks.removeTree() method recursively removes a bookmark folder and all of its contents.
239 bookmarks.search() API, Add-ons, Bookmarks, Extensions, Method, Non-standard, Reference, Search, WebExtensions
The bookmarks.search() function searches for bookmarks matching the given query.
240 bookmarks.update() API, Add-ons, Bookmarks, Extensions, Method, Non-standard, Reference, Update, WebExtensions
bookmarks.update() updates the title and/or URL of a bookmark, or the name of a bookmark folder.
241 browserAction API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, browserAction
Adds a button to the browser's toolbar.
242 browserAction.ColorArray API, Add-ons, ColorArray, Extensions, Non-standard, Reference, Type, WebExtensions, browserAction
An array of four integers in the range 0-255, defining an RGBA color. The four values specify the following channels:
243 browserAction.ImageDataType API, Add-ons, Extensions, ImageDataType, Non-standard, Reference, Type, WebExtensions, browserAction
Pixel data for an image. Must be an ImageData object (for example, from a <canvas> element).
244 browserAction.disable() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, browserAction, disable
Disables the browser action for a tab, meaning that it cannot be clicked when that tab is active.
245 browserAction.enable() API, Add-ons, Enable, Extensions, Method, Non-standard, Reference, WebExtensions, browserAction
Enables the browser action for a tab. By default, browser actions are enabled for all tabs.
246 browserAction.getBadgeBackgroundColor() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, browserAction, getBadgeBackgroundColor
Gets the background color of the browser action's badge.
247 browserAction.getBadgeText() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, browserAction, getBadgeText
Gets the browser action's badge text.
248 browserAction.getPopup() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, browserAction, getPopup
Gets the HTML document set as the popup for this browser action.
249 browserAction.getTitle() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, browserAction, getTitle
Gets the browser action's title.
250 browserAction.onClicked API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, browserAction, onClicked
Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.
251 browserAction.openPopup() API, Add-ons, Extensions, Non-standard, Reference, WebExtensions, browserAction, openPopup
This API is also available as browser.browserAction.openPopup() in a version that returns a promise.
252 browserAction.setBadgeBackgroundColor() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, browserAction, setBadgeBackgroundColor
Sets the background color for the badge.
253 browserAction.setBadgeText() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, browserAction, setBadgeText
Sets the badge text for the browser action. The badge is displayed on top of the icon.
254 browserAction.setIcon() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, browserAction, setIcon
Sets the icon for the browser action.
255 browserAction.setPopup() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, browserAction, setPopup
Sets the HTML document that will be opened as a popup when the user clicks on the browser action's icon.
256 browserAction.setTitle() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, browserAction, setTitle
Sets the browser action's title. The title is displayed in a tooltip over the browser action's icon. You can pass a tabId in as an optional parameter — if you do this then the title is changed only for the given tab.
257 browsingData
Enables extensions to clear the data that is accumulated while the user is browsing.
258 browsingData.DataTypeSet API, Add-ons, DataTypeSet, Extensions, Reference, Type, WebExtensions, browsingData
The browsingData.DataTypeSet type describes a set of data types.
259 browsingData.RemovalOptions API, Add-ons, Extensions, Reference, RemovalOptions, Type, WebExtensions, browsingData
The browsingData.RemovalOptions type contains options to control certain aspects of browsing data removal.
260 browsingData.remove() API, Add-ons, Extensions, Method, Reference, WebExtensions, browsingData, remove
Removes the specified browsing data.
261 browsingData.removeCache() API, Add-ons, Extensions, Method, Reference, WebExtensions, browsingData, removeCache
Clears the browser's cache.
262 browsingData.removeCookies() API, Add-ons, Extensions, Method, Reference, WebExtensions, browsingData, removeCookies
Clears the browser's cookies.
263 browsingData.removeDownloads() API, Add-ons, Extensions, Method, Reference, WebExtensions, browsingData, removeDownloads
Clears the browser's download history. Note that this does not delete the downloaded objects themselves, only records of downloads in the browser's history.
264 browsingData.removeFormData() API, Add-ons, Extensions, Method, Reference, WebExtensions, browsingData, removeDownloads
Clears data that the browser has saved for autofilling forms.
265 browsingData.removeHistory() API, Add-ons, Extensions, Method, Reference, WebExtensions, browsingData, removeHistory
Clears the record of web pages that the user has visited (browsing history).
266 browsingData.removePasswords() API, Add-ons, Extensions, Method, Reference, WebExtensions, browsingData, removePasswords
Clears saved passwords.
267 browsingData.removePluginData() API, Add-ons, Extensions, Method, Reference, WebExtensions, browsingData, removePluginData
Clears data stored by browser plugins.
268 browsingData.settings() API, Add-ons, Extensions, Method, Reference, Settings, WebExtensions, browsingData
Browsers have a built-in "Clear History" feature, which enables the user to clear various types of browsing data. This has a UI that enables the user to select what type of data to remove (e.g. history, downloads, ...) and how far back in time to remove data.
269 commands
Listen for the user executing commands that you have registered using the commands manifest.json key.
270 Command API, Add-ons, Command, Extensions, Non-standard, Reference, Type, WebExtensions, commands
Information about a command. This contains the information specified for the command in the commands manifest.json key.
271 getAll() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, commands, getAll
Gets all commands for the extention that you have registered using the commands manifest.json key.
272 onCommand API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, commands, onCommand
Events have three functions:
273 contextMenus API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, 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.
274 contextMenus.ACTION_MENU_TOP_LEVEL_LIMIT API, Add-ons, Extensions, Non-standard, Property, Reference, WebExtensions, contextMenus
The maximum number of top level extension items that can be added to a context menu item whose ContextType is "browser_action" or "page_action". Any items beyond this limit will be ignored.
275 contextMenus.ContextType API, Add-ons, ContextType, Extensions, Non-standard, Reference, Type, WebExtensions, contextMenus
The different contexts a menu can appear in.
276 contextMenus.ItemType API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, contextMenus, itemtype
The type of menu item.
277 contextMenus.OnClickData API, Add-ons, Extensions, Non-standard, OnClickData, Reference, Type, WebExtensions, contextMenus
Information sent when a context menu item is clicked.
278 contextMenus.create() API, Add-ons, Create, Extensions, Method, Non-standard, Reference, WebExtensions, contextMenus
Creates a new context menu item, given an options object defining properties for the item.
279 contextMenus.onClicked API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, contextMenus, onClicked
Fired when a context menu item is clicked.
280 contextMenus.remove() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, contextMenus, remove
Removes a context menu item.
281 contextMenus.removeAll() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, contextMenus, removeAll
Removes all context menu items added by the extension.
282 contextMenus.update() API, Add-ons, Extensions, Method, Non-standard, Reference, Update, WebExtensions, contextMenus
Updates a previously created context menu item.
283 contextualIdentities WebExtensions
Work with contextual identities: list, create, remove, and update contextual identities.
284 contextualIdentities.create() API, Add-ons, Create, Extensions, Method, Reference, WebExtensions, contextualIdentities
Creates a new contextual identity. Once created, the user will be able to create new tabs belonging to this contextual identity, just as they can with the built-in identities.
285 contextualIdentities.get() API, Add-ons, Extensions, Method, Reference, WebExtensions, contextualIdentities, get
Gets information about a contextual identity, given its cookie store ID.
286 contextualIdentities.query() API, Add-ons, Extensions, Method, Reference, WebExtensions, contextualIdentities, query
Gets information about all contextual identities, or about those contextual identities that match a given filter argument.
287 contextualIdentities.remove() API, Add-ons, Extensions, Method, Reference, WebExtensions, contextualIdentities, remove
Removes a contextual identity, given its cookie store ID.
288 contextualIdentities.update() API, Add-ons, Extensions, Method, Reference, Update, WebExtensions, contextualIdentities
Updates properties of a contextual identity, given its cookie store ID.
289 contextualIdentitities.ContextualIdentity API, Add-ons, ContextualIdentity, Extensions, Reference, Type, WebExtensions, contextualIdentities
The contextualIdentities.ContextualIdentity type describes a single contextual identity.
290 cookies API, Add-ons, Cookies, Extensions, Interface, Non-standard, Reference, WebExtensions
Enables extensions to get and set cookies, and be notified when they change.
291 cookies.Cookie API, Add-ons, Cookies, Extensions, Non-standard, Reference, Type, WebExtensions, cookie
The Cookie type of the cookies API represents information about an HTTP cookie.
292 cookies.CookieStore API, Add-ons, CookieStore, Cookies, Extensions, Non-standard, Reference, Type, WebExtensions
The CookieStore type of the cookies API represents a cookie store in the browser.
293 cookies.OnChangedCause API, Add-ons, Cookies, Extensions, Non-standard, OnChangedCause, Reference, Type, WebExtensions
The OnChangedCause type of the cookies API represents the reason a cookie changed.
294 cookies.get() API, Add-ons, Cookies, Extensions, Method, Non-standard, Reference, WebExtensions, get
The get() method of the cookies API retrieves information about a single cookie, given its name and URL.
295 cookies.getAll() API, Add-ons, Cookies, Extensions, Method, Non-standard, Reference, WebExtensions, getAll
The getAll() method of the cookies API retrieves all cookies from a single cookie store that match the given information.
296 cookies.getAllCookieStores() API, Add-ons, Cookies, Extensions, Method, Non-standard, Reference, WebExtensions, getAllCookieStores
The getAllCookieStores() method of the cookies API returns a list of all cookie stores.
297 cookies.onChanged API, Add-ons, Cookies, Event, Extensions, Non-standard, Reference, WebExtensions, onChanged
The onChanged event of the cookies API is fired when a cookie is set or removed.
298 cookies.remove() API, Add-ons, Cookies, Extensions, Method, Non-standard, Reference, WebExtensions, remove
The remove() method of the cookies API deletes a cookie, given its name and URL.
299 cookies.set() API, Add-ons, Cookies, Extensions, Method, Non-standard, Reference, WebExtensions, set
The set() method of the cookies API sets a cookie containing the specified cookie data. This method is equivalent to issuing an HTTP Set-Cookie header during a request to a given URL.
300 devtools.inspectedWindow API, Add-ons, Extensions, Reference, WebExtensions, devtools.inspectedWindow
The devtools.inspectedWindow API lets a devtools extension interact with the window that the developer tools are attached to.
301 devtools.inspectedWindow.eval() API, Add-ons, Extensions, Reference, WebExtensions, devtools.inspectedWindow, eval
Executes JavaScript in the window that the devtools are attached to.
302 devtools.inspectedWindow.reload() API, Add-ons, Extensions, Reference, WebExtensions, devtools.inspectedWindow, reload
Reloads the window that the devtools are attached to.
303 devtools.inspectedWindow.tabId API, Add-ons, Extensions, Reference, WebExtensions, devtools.inspectedWindow, tabId
The ID of the tab that this instance of the devtools is attached to, represented as a number.
304 devtools.network API, Add-ons, Extensions, Reference, WebExtensions, devtools.network
The devtools.network API lets a devtools extension get information about network requests associated with the window that the devtools are attached to (the inspected window).
305 devtools.network.onNavigated API, Add-ons, Extensions, Reference, WebExtensions, devtools.network
Fired when the user navigates the inspected window to a new page.
306 devtools.panels API, Add-ons, Extensions, Reference, WebExtensions, devtools.panels
The devtools.panels API lets a devtools extension define its user interface inside the devtools window.
307 devtools.panels.ExtensionPanel API, Add-ons, Extensions, Reference, WebExtensions, devtools.panels
An ExtensionPanel represents a panel added to the devtools. It's the resolution of the Promise returned by browser.devtools.panels.create().
308 devtools.panels.create() API, Add-ons, Create, Extensions, Reference, WebExtensions, devtools.panels
Adds a new panel to the devtools.
309 devtools.panels.onThemeChanged API, Add-ons, DevTools, Reference, WebExtensions, devtools.panels, onThemeChanged
Fired when the devtools theme changes.
310 devtools.panels.themeName API, Add-ons, DevTools, Reference, WebExtensions, devtools.panels, themeName
The name of the currently selected devtools theme.
311 downloads API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, downloads
Enables extensions to interact with the browser's download manager. You can use this API module to download files, cancel, pause, resume downloads, and show downloaded files in the file manager.
312 downloads.BooleanDelta API, Add-ons, BooleanDelta, Extensions, Non-standard, Reference, Type, WebExtensions, downloads
The BooleanDelta type of the downloads API represents the difference between two booleans.
313 downloads.DangerType API, Add-ons, DangerType, Extensions, Non-standard, Reference, Type, WebExtensions, downloads
The DangerType type of the downloads API defines a set of possible reasons that a downloadable file might be considered dangerous.
314 downloads.DoubleDelta API, Add-ons, DoubleDelta, Extensions, Non-standard, Reference, Type, WebExtensions, downloads
The DoubleDelta type of the downloads API represents the difference between two doubles.
315 downloads.DownloadItem API, Add-ons, DownloadItem, Extensions, Non-standard, Reference, Type, WebExtensions, downloads
The DownloadItem type of the downloads API represents a downloaded file.
316 downloads.DownloadQuery API, Add-ons, DownloadQuery, Extensions, Non-standard, Reference, Type, WebExtensions, downloads
The DownloadQuery type of the downloads API defines a set of parameters that can be used to search the downloads manager for a specific set of downloads.
317 downloads.DownloadTime API, Add-ons, DownloadTime, Extensions, Non-standard, Reference, Type, WebExtensions, downloads
The DownloadTime type of the downloads API represents the time a download took to complete.
318 downloads.FilenameConflictAction API, Add-ons, Extensions, FilenameConflictAction, Non-standard, Reference, Type, WebExtensions, downloads
The FilenameConflictAction type of the downloads API specifies what to do if the name of a downloaded file conflicts with an existing file.
319 downloads.InterruptReason API, Add-ons, Extensions, InterruptReason, Non-standard, Reference, Type, WebExtensions, downloads
The InteruptReason type of the downloads API defines a set of possible reasons why a download was interrupted.
320 downloads.State API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, downloads, state
The State type of the downloads API defines different states that a current download can be in.
321 downloads.StringDelta API, Add-ons, Extensions, Non-standard, Reference, StringDelta, Type, WebExtensions, downloads
The StringDelta type of the downloads API represents the difference between two strings.
322 downloads.acceptDanger() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, acceptDanger, downloads
The acceptDanger() function of the downloads API prompts the user to either accept or cancel a potentially dangerous download.
323 downloads.cancel() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, cancel, downloads
The cancel() function of the downloads API cancels a download. The call will fail if the download is not active: for example, because it has completed downloading.
324 downloads.download() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, download, downloads
The download() function of the downloads API downloads a file, given its URL and other optional preferences.
325 downloads.drag() API, Add-ons, Drag, Extensions, Method, Non-standard, Reference, WebExtensions, downloads
The drag() function of the downloads API initiates dragging the downloaded file to another application.
326 downloads.erase() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, downloads, erase
The erase() function of the downloads API erases matching DownloadItems from the browser's download history, without deleting the downloaded files from disk.
327 downloads.getFileIcon() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, downloads, getFileIcon
The getFileIcon() function of the downloads API retrieves an icon for the specified download.
328 downloads.onChanged API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, downloads, onChanged
The onChanged() event of the downloads API is fired when any of a downloads.DownloadItem's properties changes (except for bytesReceived).
329 downloads.onCreated API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, downloads, onCreated
The onCreated() event of the downloads API fires when a download begins, i.e. when downloads.download() is sucessfully invoked.
330 downloads.onErased API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, downloads, onErased
The onErased() event of the downloads API fires when a download is erased from the browser history.
331 downloads.open() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, downloads, open
The open() function of the downloads API opens the downloaded file with its associated application.
332 downloads.pause() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, downloads, pause
The pause() function of the downloads API pauses a download.
333 downloads.removeFile() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, downloads, removeFile
The removeFile() function of the downloads API removes a downloaded file from disk.
334 downloads.resume() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, downloads, resume
The resume() function of the downloads API resumes a paused download. If the request was successful, the download will be unpaused and progress will resume. The resume() call will fail if the download is not active: for example, because it has finished downloading.
335 downloads.search() API, Add-ons, Extensions, Method, Non-standard, Reference, Search, WebExtensions, downloads
The search() function of the downloads API queries the DownloadItems available in the browser's downloads manager, and returns those that match the specified search criteria.
336 downloads.setShelfEnabled() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, downloads, setShelfEnabled
The setShelfEnabled() function of the downloads API enables or disables the gray shelf at the bottom of every window associated with the current browser profile. The shelf will be disabled as long as at least one extension has disabled it.
337 downloads.show() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, downloads, show
The show() function of the downloads API shows the downloaded file in its containing folder in the underlying platform's file manager.
338 downloads.showDefaultFolder() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, downloads, showDefaultFolder
The showDefaultFolder() function of the downloads API opens the default downloads folder in the platform's file manager.
339 events API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, events
Common types used by APIs that dispatch events.
340 events.Event API, Add-ons, Event, Extensions, Non-standard, Reference, Type, WebExtensions, events
An object which allows the addition and removal of listeners for a browser event.
341 events.Rule API, Add-ons, Extensions, Non-standard, Reference, Rule, Type, WebExtensions, events
Description of a declarative rule for handling events.
342 events.UrlFilter API, Add-ons, Extensions, Non-standard, Reference, Type, UrlFilter, WebExtensions, events
Describes various criteria for filtering URLs. If all of the criteria specified in the filter's properties match the URL, then the filter matches. Filters are often provided to API methods in an Array of UrlFilters. For example, webNavigation listeners can be added with a filter which is an object with a single url property that is an Array of UrlFilters, e.g. {url:[UrlFilter,UrlFilter,...]}. If any filter within the Array of UrlFilters matches, then it is considered a match for the Array. Effectively, the criteria specified within a single filter are AND'ed together, while all of the individual filters within an Array are OR'ed.
343 extension API, Add-ons, Extension, Extensions, Interface, Non-standard, Reference, WebExtensions
Utilities related to your extension. Get URLs to resources packages with your extension, get the Window object for your extension'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.
344 extension.ViewType API, Add-ons, Extension, Extensions, Non-standard, Reference, Type, ViewType, WebExtensions
The type of extension view.
345 extension.getBackgroundPage() API, Add-ons, Extension, Extensions, Method, Non-standard, Reference, WebExtensions, getBackgroundPage
Alias for runtime.getBackgroundPage().
346 extension.getExtensionTabs() API, Add-ons, Extension, Extensions, Method, Non-standard, Reference, WebExtensions, getExtensionTabs
Returns an array of the JavaScript Window objects for each of the tabs running inside the current extension. If windowId is specified, returns only the Window objects of tabs attached to the specified window.
347 extension.getURL() API, Add-ons, Extension, Extensions, Method, Non-standard, Reference, WebExtensions, getURL
Converts a relative path within an extension's install directory to a fully-qualified URL.
348 extension.getViews() API, Add-ons, Extension, Extensions, Method, Non-standard, Reference, WebExtensions, getViews
Returns an array of the Window objects for each of the pages running inside the current extension. This includes, for example:
349 extension.inIncognitoContext API, Add-ons, Extension, Extensions, Non-standard, Property, Reference, WebExtensions, inIncognitoContext
Boolean value, true for content scripts running inside private browsing tabs and for extension pages running inside a private browsing process.
350 extension.isAllowedFileSchemeAccess() API, Add-ons, Extension, Extensions, Method, Non-standard, Reference, WebExtensions, isAllowedFileSchemeAccess
None.
351 extension.isAllowedIncognitoAccess() API, Add-ons, Extension, Extensions, Method, Non-standard, Reference, WebExtensions, isAllowedIncognitoAccess
Check whether the extension is allowed access to tabs opened in "private browsing" mode.
352 extension.lastError API, Add-ons, Extension, Extensions, Non-standard, Property, Reference, WebExtensions, lastError
An alias for runtime.lastError.
353 extension.onRequest API, Add-ons, Event, Extension, Extensions, Non-standard, Reference, WebExtensions, onRequest
Fired when a request is sent from either an extension process or a content script.
354 extension.onRequestExternal API, Add-ons, Event, Extension, Extensions, Non-standard, Reference, WebExtensions, onRequestExternal
Fired when a request is sent from another extension.
355 extension.sendRequest() API, Add-ons, Extension, Extensions, Method, Non-standard, Reference, WebExtensions, sendRequest
Sends a single request to other listeners within the extension. Similar to runtime.connect, but only sends a single request with an optional response. The extension.onRequest event is fired in each page of the extension.
356 extension.setUpdateUrlData() API, Add-ons, Extension, Extensions, Method, Non-standard, Reference, WebExtensions, setUpdateUrlData
Sets parameters for the extension's update URL. This value is ignored for extensions that are hosted in the browser vendor's store.
357 extensionTypes API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, extensionTypes
Some common types used in other WebExtension APIs.
358 extensionTypes.ImageDetails API, Add-ons, Extensions, ImageDetails, Non-standard, Reference, Type, WebExtensions, extensionTypes
Details about the format and quality of an image.
359 extensionTypes.ImageFormat API, Add-ons, Extensions, ImageFormat, Non-standard, Reference, Type, WebExtensions, extensionTypes
The format of an image.
360 extensionTypes.InjectDetails API, Add-ons, Extensions, InjectDetails, Non-standard, Reference, Type, WebExtensions, extensionTypes
This type is given as a parameter to the tabs.executeScript(), tabs.insertCSS(), and tabs.removeCSS() methods. For the details of its properties and what they are used for, see the documentation pages for those methods:
361 extensionTypes.RunAt API, Add-ons, Extensions, Non-standard, Reference, RunAt, Type, WebExtensions, extensionTypes
The soonest that the JavaScript or CSS will be injected into the tab.
362 history API, Add-ons, Extensions, History, Interface, Non-standard, Reference, WebExtensions
Use the history API to interact with the browser history.
363 history.HistoryItem API, Add-ons, Extensions, History, HistoryItem, Non-standard, Reference, Type, WebExtensions
A HistoryItem object provides information about a page in the browser history.
364 history.TransitionType API, Add-ons, Extensions, History, Non-standard, Reference, TransitionType, Type, WebExtensions
This describes how the browser navigated to a particular page. For example, "link" means that the browser navigated to the page because the user clicked a link.
365 history.VisitItem API, Add-ons, Extensions, History, Non-standard, Reference, Type, VisitItem, WebExtensions
An object describing a single visit to a page.
366 history.addUrl() API, Add-ons, Extensions, History, Method, Non-standard, Reference, WebExtensions, addUrl
Adds a record to the browser's history of a visit to the given URL. The visit's time is recorded as the time of the call, and the TransitionType is recorded as "link".
367 history.deleteAll() API, Add-ons, Extensions, History, Method, Non-standard, Reference, WebExtensions, deleteAll
Deletes all visits from the browser's history.
368 history.deleteRange() API, Add-ons, Extensions, History, Method, Non-standard, Reference, WebExtensions, deleteRange
Removes all visits to pages that the user made during the given time range. If this removes all visits made to a given page, then the page will be no longer appear in the browser history and history.onVisitRemoved will fire for it.
369 history.deleteUrl() API, Add-ons, Extensions, History, Method, Non-standard, Reference, WebExtensions, deleteUrl
Removes all visits to the given URL from the browser history.
370 history.getVisits() API, Add-ons, Extensions, History, Method, Non-standard, Reference, WebExtensions, getVisits
Retrieves information about all visits to the given URL.
371 history.onTitleChanged API, Add-ons, Event, History, Reference, WebExtensions, onTitleChanged
Events have three functions:
372 history.onVisitRemoved API, Add-ons, Event, Extensions, History, Non-standard, Reference, WebExtensions, onVisitRemoved
Fired when a page is removed completely from the browser history.
373 history.onVisited API, Add-ons, Event, Extensions, History, Non-standard, Reference, WebExtensions, onVisited
Fired each time the user visits a page. A history.HistoryItem object is passed to the listener. This event fires before the page has loaded.
374 history.search() API, Add-ons, Extensions, History, Method, Non-standard, Reference, Search, WebExtensions
Searches the browser's history for history.HistoryItem objects matching the given criteria.
375 i18n API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, i18n
Functions to internationalize your extension. You can use these APIs to get localized strings from locale files packaged with your extension, find out the browser's current language, and find out the value of its Accept-Language header.
376 Locale-specific message reference Internationalization, Localization, Reference, String, WebExtensions, i18n, message, messages.json, placeholders
Each internationalized extension has at least one file named messages.json that provides locale-specific strings. This page describes the format of messages.json files.
377 i18n.LanguageCode API, Add-ons, Extensions, LanguageCode, Non-standard, Reference, Type, WebExtensions, i18n
A language tag such as "en-US" or "fr".
378 i18n.detectLanguage() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, detectLanguage, i18n
Detects the language of the provided text using the Compact Language Detector (CLD).
379 i18n.getAcceptLanguages() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getAcceptLanguages, i18n
Gets the accept-languages of the browser. This is different from the locale used by the browser. To get the locale, use i18n.getUILanguage.
380 i18n.getMessage() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getMessage, i18n
Gets the localized string for the specified message.
381 i18n.getUILanguage() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getUILanguage, i18n
Gets the UI language of the browser. This is different from i18n.getAcceptLanguages which returns the preferred user languages.
382 identity API, Add-ons, Extensions, Identity, Reference, WebExtensions
Use the identity API to get an OAuth2 authorization code or access token, which an extension can then use to access user data from a service which supports OAuth2 access (such as a Google or a Facebook account).
383 identity.getRedirectURL() API, Add-ons, Extensions, Identity, Method, Reference, WebExtensions, getRedirectURL
Generates a URL that you can use as a redirect URL.
384 identity.launchWebAuthFlow API, Add-ons, Extensions, Identity, Method, Reference, WebExtensions, launchWebAuthFlow
Performs the first part of an OAuth2 flow, including user authentication and client authorization.
385 idle API, Add-ons, Extensions, Idle, Interface, Non-standard, Reference, WebExtensions
Find out when the user's system is idle, locked, or active.
386 idle.IdleState API, Add-ons, Extensions, Idle, IdleState, Non-standard, Reference, Type, WebExtensions
String describing the device's idle state.
387 idle.onStateChanged API, Add-ons, Event, Extensions, Idle, Non-standard, Reference, WebExtensions, onStateChanged
Fired when the system changes to an active, idle or locked state. The event listener is passed a string that has one of three values:
388 idle.queryState() API, Add-ons, Extensions, Idle, Method, Non-standard, Reference, WebExtensions, queryState
Returns "locked" if the system is locked, "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise.
389 idle.setDetectionInterval() API, Add-ons, Extensions, Idle, Method, Non-standard, Reference, WebExtensions, setDetectionInterval
Sets the interval, in seconds, used to determine when the system is in an idle state for idle.onStateChanged events. The default interval is 60 seconds.
390 management API, Add-ons, Extensions, Reference, WebExtensions, management
Get information about installed add-ons.
391 ExtensionInfo API, Add-ons, ExtensionInfo, Extensions, Reference, Type, WebExtensions, management
An ExtensionInfo object contains information about an add-on.
392 management.get() API, Add-ons, Method, Reference, WebExtensions, get, management
Retrieves an ExtensionInfo object containing information about the specified add-on.
393 management.getAll() API, Add-ons, Method, Reference, WebExtensions, getAll, management
Retrieves an array of ExtensionInfo objects, one for each installed add-on.
394 management.getPermissionWarningsById() API, Add-ons, Method, Reference, WebExtensions, getPermissionWarningsById, management
Given the ID of an add-on, this function returns the permission warnings for it as an array of strings.
395 management.getPermissionWarningsByManifest() API, Add-ons, Method, Reference, WebExtensions, getPermissionWarningsByManifest, management
Given the text of a manifest.json file, this function returns the permission warnings that would be given for the resulting add-on, as an array of strings.
396 management.getSelf() API, Add-ons, Method, Reference, WebExtensions, getSelf, management
Retrieves an ExtensionInfo object containing information about the calling add-on.
397 management.onDisabled() API, Add-ons, Event, Reference, WebExtensions, management, onDisabled
Fired when an add-on is disabled.
398 management.onEnabled() API, Add-ons, Event, Reference, WebExtensions, management, onEnabled
Fired when an add-on is enabled.
399 management.onInstalled() API, Add-ons, Event, Reference, WebExtensions, management, onInstalled
Fired when an add-on is installed.
400 management.onUninstalled() API, Add-ons, Event, Reference, WebExtensions, management, onUninstalled
Fired when an add-on is uninstalled.
401 management.setEnabled() API, Add-ons, Method, Reference, WebExtensions, management, setEnabled
Enables or disables the given add-on. This function can only be used by themes and not by other types of add-ons.
402 management.uninstall() API, Add-ons, Method, Reference, WebExtensions, management, uninstall
Uninstalls an add-on, given its ID.
403 management.uninstallSelf() API, Add-ons, Method, Reference, WebExtensions, management, uninstallSelf
Uninstalls the calling add-on.
404 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.
405 notifications.NotificationOptions API, Add-ons, Extensions, Non-standard, NotificationOptions, Notifications, Reference, Type, WebExtensions
This type contains all the data needed to:
406 notifications.TemplateType API, Add-ons, Extensions, Non-standard, Notifications, Reference, TemplateType, Type, WebExtensions
This is a string, and represents the type of notification to create. There are four types of notification: "basic", "image", "list", "progress".
407 notifications.clear() API, Add-ons, Extensions, Method, Non-standard, Notifications, Reference, WebExtensions, clear
Clears a notification, given its ID.
408 notifications.create() API, Add-ons, Create, Extensions, Method, Non-standard, Notifications, Reference, WebExtensions
Creates and displays a notification.
409 notifications.getAll() API, Add-ons, Extensions, Method, Non-standard, Notifications, Reference, WebExtensions, getAll
Gets all currently active notifications created by the extension.
410 notifications.onButtonClicked API, Add-ons, Event, Extensions, Non-standard, Notifications, Reference, WebExtensions, onButtonClicked
Fired when the user clicks one of the notification's buttons.
411 notifications.onClicked API, Add-ons, Event, Extensions, Non-standard, Notifications, Reference, WebExtensions, onClicked
Fired when the user clicks a notification, but not on any of the notification's buttons (for that, see notifications.onButtonClicked).
412 notifications.onClosed API, Add-ons, Event, Extensions, Non-standard, Notifications, Reference, WebExtensions, onClosed
Fired when a notification is closed, either by the system or by the user.
413 notifications.update() API, Add-ons, Extensions, Method, Non-standard, Notifications, Reference, Update, WebExtensions
Updates a notification, given its ID.
414 omnibox API, Add-ons, Extensions, Reference, WebExtensions, omnibox
Enables extensions to implement customised behavior when the user types into the browser's address bar.
415 omnibox.OnInputEnteredDisposition API, Add-ons, Extensions, OnInputEnteredDisposition, Reference, Type, WebExtensions, omnibox
The omnibox.OnInputEnteredDisposition type describes how the extension should handle a user selection from the suggestions in the address bar's drop-down list.
416 omnibox.SuggestResult API, Add-ons, Extensions, Reference, SuggestResult, Type, WebExtensions, omnibox
The omnibox.SuggestResult type defines a single suggestion that the extension can add to the address bar's drop-down list.
417 omnibox.onInputCancelled API, Add-ons, Event, Extensions, Reference, WebExtensions, omnibox, onInputCancelled
Fired when the user has cancelled their interaction with your extension (for example, by clicking outside the address bar).
418 omnibox.onInputChanged API, Add-ons, Event, Extensions, Reference, WebExtensions, omnibox, onInputChanged
Fired whenever the user changes their input, after they have started interacting with your extension by entering its keyword in the address bar and then pressing the space key.
419 omnibox.onInputEntered API, Add-ons, Event, Extensions, Reference, WebExtensions, omnibox, onInputEntered
Fired when the user has selected one of the suggestions your extension has added to the address bar's drop-down list.
420 omnibox.onInputStarted API, Add-ons, Event, Extensions, Reference, WebExtensions, omnibox, onInputStarted
Fired when the user starts interacting with your extension by entering its keyword in the address bar and then pressing the space key.
421 omnibox.setDefaultSuggestion() API, Add-ons, Extensions, Method, Reference, WebExtensions, omnibox, setDefaultSuggestion
Set the default suggestion to appear in the address bar drop-down list when the user starts interacting with your extension.
422 pageAction API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, pageAction
A page action is a clickable icon inside the browser's address bar.
423 pageAction.ImageDataType API, Add-ons, Extensions, ImageDataType, Non-standard, Reference, Type, WebExtensions, pageAction
Pixel data for an image.
424 pageAction.getPopup() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getPopup, pageAction
Gets the URL for the HTML document set as the popup for this page action.
425 pageAction.getTitle() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getTitle, pageAction
Gets the title of the page action.
426 pageAction.hide() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, hide, pageAction
Hides the page action for a given tab.
427 pageAction.onClicked API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onClicked, pageAction
Fired when a page action icon is clicked. This event will not fire if the page action has a popup.
428 pageAction.setIcon() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, pageAction, setIcon
Sets the icon for the page action.
429 pageAction.setPopup() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, pageAction, setPopup
Sets the HTML document to be opened as a popup when the user clicks on the page action's icon.
430 pageAction.setTitle() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, pageAction, setTitle
Sets the title of the page action. The title is displayed in a tooltip when the user hovers over the page action.
431 pageAction.show() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, pageAction, show
Shows the page action for a given tab. The page action is shown whenever the given tab is the active tab.
432 permissions API, Add-ons, Extensions, Permissions, Reference, WebExtensions
Extensions need permissions to access many of the more powerful WebExtension APIs. They can ask for permissions at install time by including the permissions they need in the permissions manifest.json key. The main advantages of asking for permissions at install time are:
433 Permissions API, Add-ons, Permissions, Reference, Type, WebExtensions
A Permissions object represents a collection of permissions.
434 permissions.contains() API, Add-ons, Contains, Method, Permissions, Reference, WebExtensions
Check whether the extension has the permissions listed in the given permissions.Permissions object.
435 permissions.getAll() API, Add-ons, Method, Permissions, Reference, WebExtensions, getAll
Retrieve a permissions.Permissions object containing all the permissions currently granted to the extension.
436 permissions.onAdded API, Add-ons, Event, Permissions, Reference, WebExtensions, onAdded
Fired when the extension granted new permissions.
437 permissions.onRemoved API, Add-ons, Event, Permissions, Reference, WebExtensions, onRemoved
Fired when some permissions are removed from the extension.
438 permissions.remove() API, Add-ons, Method, Permissions, Reference, WebExtensions, remove
Ask to give up the permissions listed in the given permissions.Permissions object.
439 permissions.request() API, Add-ons, Method, Permissions, Reference, WebExtensions, request
Ask for the set of permissions listed in the given permissions.Permissions object.
440 privacy API, Add-ons, Extensions, Privacy, Reference, WebExtensions
Access and modify various privacy-related browser settings.
441 privacy.network API, Add-ons, Extensions, Network, Privacy, Property, Reference, WebExtensions
No summary!
442 privacy.websites API, Add-ons, Extensions, Privacy, Property, Reference, WebExtensions, websites
No summary!
443 proxy API, Add-ons, Proxy, WebExtensions
Use the proxy API to register an extended Proxy Auto-Configuration (PAC) file, which implements a policy for proxying web requests. This implementation deviates from standard PAC design in several ways because the de-facto specification for PAC files hasn't changed since its initial implementation circa 1995. There is no standards body maintaining the specification.
444 proxy.onProxyError API, Add-ons, Event, Proxy, Reference, WebExtensions, onProxyError
Fired when there is an error evaluating the PAC file.
445 proxy.registerProxyScript() API, Add-ons, Function, Method, Proxy, Reference, WebExtensions, registerProxyScript
Registers a Proxy Auto-Configuration (PAC) file. The file is executed immediately, and its FindProxyForURL() function will be called for any HTTP, HTTPS, or FTP requests.
446 runtime API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, runtime
This module provides information about your extension and the environment it's running in.
447 runtime.MessageSender API, Add-ons, Extensions, MessageSender, Non-standard, Reference, Type, WebExtensions, runtime
An object containing information about the sender of a message or connection request; this is passed to the runtime.onMessage() listener.
448 runtime.OnInstalledReason API, Add-ons, Extensions, Non-standard, OnInstalledReason, Reference, Type, WebExtensions, runtime
The reason that the runtime.onInstalled event is being dispatched.
449 runtime.OnRestartRequiredReason API, Add-ons, Extensions, Non-standard, OnRestartRequiredReason, Reference, Type, WebExtensions, runtime
The reason that the onRestartRequired event is being dispatched.
450 runtime.PlatformArch API, Add-ons, Extensions, Non-standard, PlatformArch, Reference, Type, WebExtensions, runtime
The machine's processor architecture.
451 runtime.PlatformInfo API, Add-ons, Extensions, Non-standard, PlatformInfo, Reference, Type, WebExtensions, runtime
An object containing information about the current platform.
452 runtime.PlatformNaclArch API, Add-ons, Extensions, Non-standard, PlatformNaclArch, Reference, Type, WebExtensions, runtime
The native client architecture. This may be different from arch on some platforms.
453 runtime.PlatformOs API, Add-ons, Extensions, Non-standard, PlatformOs, Reference, Type, WebExtensions, runtime
The operating system the browser is running on.
454 runtime.Port API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, port, runtime
A Port object represents one end of a connection between two specific contexts, which can be used to exchange messages.
455 runtime.RequestUpdateCheckStatus API, Add-ons, Extensions, Non-standard, Reference, RequestUpdateCheckStatus, Type, WebExtensions, runtime
Result of a call to runtime.requestUpdateCheck().
456 runtime.connect() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, connect, runtime
Make a connection between different contexts inside the extension.
457 runtime.connectNative() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, connectNative, runtime
For more information, see Native messaging.
458 runtime.getBackgroundPage() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getBackgroundPage, runtime
Retrieves the Window object for the background page running inside the current extension.
459 runtime.getBrowserInfo()
Returns information about the browser in which the extension is installed.
460 runtime.getManifest() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getManifest, runtime
None.
461 runtime.getPackageDirectoryEntry() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getPackageDirectoryEntry, runtime
Returns a DirectoryEntry object representing the package directory.
462 runtime.getPlatformInfo() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getPlatformInfo, runtime
Returns information about the current platform.
463 runtime.getURL() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getURL, runtime
string. The fully-qualified URL to the resource.
464 runtime.id API, Add-ons, Extensions, Non-standard, Property, Reference, WebExtensions, id, runtime
The ID of the extension.
465 runtime.lastError API, Add-ons, Extensions, Non-standard, Property, Reference, WebExtensions, lastError, runtime
The runtime.lastError property is set when an asynchronous function has an error condition that it needs to report to its caller.
466 runtime.onBrowserUpdateAvailable API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onBrowserUpdateAvailable, runtime
Fired when an update for the browser is available, but it isn't installed immediately because a browser restart is required.
467 runtime.onConnect API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onconnect, runtime
Fired when a connection is made with either an extension process or a content script.
468 runtime.onConnectExternal API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onConnectExternal, runtime
Fired when an extension receives a connection request from a different extension.
469 runtime.onInstalled API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onInstalled, runtime
Fired when the extension is first installed, when the extension is updated to a new version, and when the browser is updated to a new version.
470 runtime.onMessage API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onmessage, runtime
To send a message which will be received by the onMessage listener, use runtime.sendMessage() or (to send a message to a content script) tabs.sendMessage().
471 runtime.onMessageExternal API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onMessageExternal, runtime
This API can't be used in a content script.
472 runtime.onRestartRequired API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onRestartRequired, runtime
Fired when an app or the device that it runs on needs to be restarted. The app should close all its windows at its earliest convenience to let the restart happen. If the app does nothing, a restart will be enforced after a 24-hour grace period has passed. Currently, this event is only fired for Chrome OS kiosk apps.
473 runtime.onStartup API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onStartup, runtime
Fired when a profile that has this extension installed first starts up. This event is not fired when a private browsing/incognito profile is started, even if this extension is operating in 'split' incognito mode.
474 runtime.onSuspend API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onSuspend, runtime
Sent to the event page just before it is unloaded. This gives the extension an opportunity to do some cleanup. Note that since the page is unloading, any asynchronous operations started while handling this event are not guaranteed to complete.
475 runtime.onSuspendCanceled API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onSuspendCanceled, runtime
Sent after runtime.onSuspend to indicate that the app won't be unloaded after all.
476 runtime.onUpdateAvailable API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onUpdateAvailable, runtime
Fired when an update to the extension is available. This event enables an extension to delay an update: for example, because it is in the middle of some operation which should not be interrupted.
477 runtime.openOptionsPage() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, openOptionsPage, runtime
This is an asynchronous function that returns a Promise.
478 runtime.reload() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, reload, runtime
Reloads the extension.
479 runtime.requestUpdateCheck() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, requestUpdateCheck, runtime
Checks to see if an update for the extension is available.
480 runtime.sendMessage() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, runtime, sendMessage
Sends a single message to event listeners within your extension or a different extension.
481 runtime.sendNativeMessage() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, runtime, sendNativeMessage
Sends a single message from an extension to a native application.
482 runtime.setUninstallURL() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, runtime, setUninstallURL
Sets the URL to be visited when the extension is uninstalled. This may be used to clean up server-side data, do analytics, or implement surveys. The URL can be a maximum 255 characters.
483 sessions
Use the sessions API to list, and restore, tabs and windows that have been closed while the browser has been running.
484 sessions.Filter API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, filter, sessions
The Filter object enables you to restrict the number of Session objects returned by a call to sessions.getRecentlyClosed().
485 sessions.MAX_SESSION_RESULTS API, Add-ons, Extensions, MAX_SESSION_RESULTS, Non-standard, Property, Reference, WebExtensions, sessions
This value represents the maximum number of sessions that will be returned by a call to sessions.getRecentlyClosed(). It is read-only for WebExtension code, and is set to 25.
486 sessions.Session API, Add-ons, Extensions, Non-standard, Reference, Session, Type, WebExtensions, sessions
The Session object represents a tab or window that the user has closed in the current browsing session.
487 sessions.getRecentlyClosed() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getRecentlyClosed, sessions
Returns an array of Session objects, representing windows and tabs that were closed in the current browsing session (that is: the time since the browser was started).
488 sessions.onChanged API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onChanged, sessions
Fired whenever the list of closed tabs or windows changes.
489 sessions.restore() API, Add-ons, Extensions, Method, Non-standard, WebExtensions, restore, sessions
Restores a closed tab or window. Restoring doesn't just reopen the tab or window: it also restores the tab's navigation history so the back/forward buttons will work. Restoring a window will restore all the tabs that the window contained when it was closed.
490 sidebarAction
Gets and sets properties of an extension's sidebar.
491 sidebarAction.ImageDataType API, Add-ons, Extensions, ImageDataType, Reference, Type, WebExtensions, sidebarAction
Pixel data for an image. Must be an ImageData object (for example, from a <canvas> element).
492 sidebarAction.getPanel() API, Add-ons, Extensions, Method, Reference, WebExtensions, getPanel, sidebarAction
Gets a URL to the HTML document that defines the sidebar's contents.
493 sidebarAction.getTitle() API, Add-ons, Extensions, Method, Reference, WebExtensions, getTitle, sidebarAction
Gets the sidebar's title.
494 sidebarAction.setIcon() API, Add-ons, Extensions, Method, Reference, WebExtensions, setIcon, sidebarAction
Sets the icon for the sidebar.
495 sidebarAction.setPanel() API, Add-ons, Extensions, Method, Reference, WebExtensions, setPanel, sidebarAction
Sets the HTML document that defines the content of this sidebar.
496 sidebarAction.setTitle() API, Add-ons, Extensions, Method, Reference, WebExtensions, setTitle, sidebarAction
Sets the sidebar's title. The title is displayed anywhere the browser lists available sidebars. For example, Firefox will show it in the "View > Sidebar" menu. It's also shown at the top o the sidebar when the sidebar is open.
497 storage API, Add-ons, Extensions, Interface, Non-standard, Reference, Storage, WebExtensions
Enables extensions to store and retrieve data, and listen for changes to stored items.
498 storage.StorageArea API, Add-ons, Extensions, Non-standard, Reference, Storage, StorageArea, Type, WebExtensions
StorageArea is an object representing a change to a storage area.
499 StorageArea.clear() API, Add-ons, Extensions, Method, Non-standard, Reference, Storage, StorageArea, WebExtensions, remove
Removes all items from the storage area.
500 StorageArea.get() API, Add-ons, Extensions, Method, Non-standard, Reference, Storage, StorageArea, WebExtensions, get
Retrieves one or more items from the storage area.
501 StorageArea.getBytesInUse() API, Add-ons, Extensions, Method, Non-standard, Reference, Storage, StorageArea, WebExtensions, getBytesInUse
Gets the amount of storage space, in bytes, used one or more items being stored in the storage area.
502 StorageArea.remove() API, Add-ons, Extensions, Method, Non-standard, Reference, Storage, StorageArea, WebExtensions, remove
Removes one or more items from the storage area.
503 StorageArea.set() API, Add-ons, Extensions, Method, Non-standard, Reference, Storage, StorageArea, WebExtensions, set
Stores one or more items in the storage area, or update existing items.
504 storage.StorageChange API, Add-ons, Extensions, Non-standard, Reference, Storage, StorageChange, Type, WebExtensions
StorageChange objects contain the following properties:
505 storage.local API, Add-ons, Extensions, Non-standard, Property, Reference, Storage, WebExtensions, local
Represents the local storage area. Items in local storage are local to the machine the extension was installed on.
506 storage.managed API, Add-ons, Extensions, Non-standard, Property, Reference, Storage, WebExtensions, managed
Respresents the managed storage area. Items in managed storage are set by the domain administrator and are read-only for the extension. Trying to modify this namespace results in an error.
507 storage.onChanged API, Add-ons, Event, Extensions, Non-standard, Reference, Storage, WebExtensions, onChanged
Fired when one or more items change.
508 storage.sync API, Add-ons, Extensions, Non-standard, Property, Reference, Storage, Sync, WebExtensions
Represents the sync storage area. Items in sync storage are synced by the browser, and are available across all instances of that browser that the user is logged into (e.g. via Firefox sync, or a Google account), across different devices.
509 tabs API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, tabs
Interact with the browser's tab system.
510 tabs.MutedInfo API, Add-ons, Extensions, MutedInfo, Non-standard, Reference, Type, WebExtensions, tabs
This object contains a boolean indicating whether the tab is muted, and the reason for the last state change.
511 tabs.MutedInfoReason API, Add-ons, Extensions, MutedInfoReason, Non-standard, Reference, Type, WebExtensions, tabs
Specifies the reason a tab was muted or unmuted.
512 tabs.TAB_ID_NONE API, Add-ons, Extensions, Non-standard, Property, Reference, TAB_ID_NONE, WebExtensions, tabs
A special ID value given to tabs that are not browser tabs (for example, tabs in devtools windows).
513 tabs.Tab API, Add-ons, Extensions, Non-standard, Reference, Tab, Type, WebExtensions, tabs
The type tabs.Tab contains information about a tab. This provides access to information about what content is in the tab, how large the content is, what special states or restrictions are in effect, and so forth.
514 tabs.TabStatus API, Add-ons, Extensions, Non-standard, Reference, TabStatus, Type, WebExtensions, tabs
Indicates whether the tab has finished loading.
515 tabs.WindowType API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, WindowType, tabs
The type of window that hosts this tab.
516 tabs.ZoomSettings API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, ZoomSettings, tabs
Defines zoom settings for a tab: modescope, and default zoom factor.
517 tabs.ZoomSettingsMode API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, ZoomSettingsMode, tabs
Defines how zoom changes are handled. Extensions can pass this value into tabs.setZoomSettings() to control how the browser handles attempts to change zoom settings for a tab. Defaults to "automatic".
518 tabs.ZoomSettingsScope API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, ZoomSettingsScope, tabs
Defines whether zoom changes will persist for the page's origin, or only take effect in this tab. This defaults to per-origin when tabs.zoomSettingsMode is "automatic", and is always per-tab otherwise.
519 tabs.captureVisibleTab() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, captureVisibleTab, tabs
Creates a data URI encoding an image of the visible area of the currently active tab in the specified window. You must have the <all_urls> permission to use this method.
520 tabs.connect() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, connect, tabs
Call this function to set up a connection between the extension's background scripts (or other privileged scripts, such as popup scripts or options page scripts) and any content scripts that belong to this extension and are running in the specified tab. This function returns a runtime.Port object.
521 tabs.create() API, Add-ons, Create, Extensions, Method, Non-standard, Reference, WebExtensions, tabs
Creates a new tab.
522 tabs.detectLanguage() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, detectLanguage, tabs
Detects the primary language of the content in a tab, using the Compact Language Detector (CLD).
523 tabs.duplicate() API, Add-ons, Duplicate, Extensions, Method, Non-standard, Reference, WebExtensions, tabs
Duplicates a tab, given its ID.
524 tabs.executeScript() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, executeScript, tabs
Injects JavaScript code into a page.
525 tabs.get() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, get, tabs
Given a tab ID, get the tab's details as a tabs.Tab object.
526 tabs.getAllInWindow() API, Add-ons, Deprecated, Extensions, Method, Non-standard, Reference, WebExtensions, getAllInWindow, tabs
Gets details about all tabs in the specified window.
527 tabs.getCurrent() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getCurrent, tabs
Get a tabs.Tab containing information about the tab that this script is running in.
528 tabs.getSelected() API, Add-ons, Deprecated, Extensions, Method, Non-standard, Reference, WebExtensions, getSelected, tabs
Gets the tab that is selected in the specified window.
529 tabs.getZoom() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getZoom, tabs
Gets the current zoom factor for the specified tab.
530 tabs.getZoomSettings() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getZoomSettings, tabs
Gets the current zoom settings for a specified tab.
531 tabs.highlight() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, highlight, tabs
A Promise that will be fulfilled with a windows.Window object containing details about the window whose tabs were highlighted. If the window could not be found or some other error occurs, the promise will be rejected with an error message.
532 tabs.insertCSS() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, insertCSS, tabs
Injects CSS into a page.
533 tabs.move() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, move, tabs
Moves one or more tabs to a new position in the same window or to a different window.
534 tabs.onActivated API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onActivated, tabs
Fires when the active tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to tabs.onUpdated events to be notified when a URL is set.
535 tabs.onActiveChanged API, Add-ons, Deprecated, Event, Extensions, Non-standard, Reference, WebExtensions, onActiveChanged, tabs
Fires when the selected tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to tabs.onUpdated events to be notified when a URL is set.
536 tabs.onAttached API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onAttached, tabs
Fired when a tab is attached to a window, for example because it was moved between windows.
537 tabs.onCreated API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onCreated, tabs
Fired when a tab is created.
538 tabs.onDetached API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onDetached, tabs
Fired when a tab is detached from a window, for example because it is being moved between windows.
539 tabs.onHighlightChanged API, Add-ons, Deprecated, Event, Extensions, Non-standard, Reference, WebExtensions, onHighlightChanged, tabs
Fired when the highlighted or selected tabs in a window changes.
540 tabs.onHighlighted API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onHighlighted, tabs
Fired when the set of highlighted tabs in a window changes.
541 tabs.onMoved API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onMoved, tabs
Fired when a tab is moved within a window.
542 tabs.onRemoved API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onRemoved, tabs
Fired when a tab is closed.
543 tabs.onReplaced API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onReplaced, tabs
Fired when a tab is replaced with another tab due to prerendering or instant.
544 tabs.onSelectionChanged API, Add-ons, Deprecated, Event, Extensions, Non-standard, Reference, WebExtensions, onSelectionChanged, tabs
Fires when the selected tab in a window changes.
545 tabs.onUpdated API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onUpdated, tabs
Fired when a tab is updated.
546 tabs.onZoomChange API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onZoomChange, tabs
Fired when a tab is zoomed.
547 tabs.query() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, query, tabs
Gets all tabs that have the specified properties, or all tabs if no properties are specified.
548 tabs.reload() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, reload, tabs
Reload a tab, optionally bypassing the local web cache.
549 tabs.remove() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, remove, tabs
Closes one or more tabs.
550 tabs.removeCSS() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, removeCSS, tabs
Removes from a page CSS which was previously injected by a call to tabs.insertCSS().
551 tabs.sendMessage() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, sendMessage, tabs
Sends a single message from the extension's background scripts (or other privileged scripts, such as popup scripts or options page scripts) to any content scripts that belong to the extension and are running in the specified tab.
552 tabs.sendRequest() API, Add-ons, Deprecated, Extensions, Method, Non-standard, Reference, WebExtensions, sendRequest, tabs
Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The extension.onRequest event is fired in each content script running in the specified tab for the current extension.
553 tabs.setZoom() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, setZoom, tabs
Zooms the specified tab.
554 tabs.setZoomSettings() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, setZoomSettings, tabs
Sets zoom settings for the specified tab. These settings are reset to the default settings upon navigating the tab.
555 tabs.update() API, Add-ons, Extensions, Method, Non-standard, Reference, Update, WebExtensions, tabs
Navigate the tab to a new URL, or modify other properties of the tab.
556 theme Extensions, Themes, WebExtensions, add-on
Enables browser extensions to update the browser theme.
557 Theme Extension, Theme, WebExtensisons, add-on
A Theme object represents the specification of a theme.
558 update Add-ons, Extensions, Theme, WebExtensions
Updates the browser theme according to the content of theme object.
559 topSites
Use the topSites API to get an array containing all the sites listed in the browser's "New Tab" page.
560 topSites.MostVisitedURL API, Add-ons, Extensions, MostVisitedURL, Non-standard, Reference, Type, WebExtensions, topSites
The MostVisitedURL type contains two properties: the title of a page and its URL.
561 topSites.get() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, get, topSites
Gets an array containing all the sites listed in the browser's "New Tab" page.
562 types API, Add-ons, Extensions, Reference, Types, WebExtensions
Defines the BrowserSetting type, which is used to represent a browser setting.
563 BrowserSetting API, Add-ons, BrowserSetting, Extensions, Reference, Type, Types, WebExtensions
A BrowserSetting is an object representing a browser setting.
564 clear()
Use BrowserSetting.clear() to clear any changes the extension has made to the browser setting. The browser setting will revert to its previous value.
565 get() API, Add-ons, Extensions, Method, Reference, Types, WebExtensions, get
The BrowserSetting.get() method gets the current value of the browser setting, and an enumeration indicating how the setting's value is currently controlled.
566 onChange API, Add-ons, BrowserSetting, Event, Extensions, Privacy, Reference, WebExtensions, onchange
The BrowserSetting.onChanged event is fired when the setting is changed.
567 set() API, Add-ons, BrowserSetting, Extensions, Privacy, Reference, WebExtensions, set
Use BrowserSetting.set() to change the browser setting to a new value.
568 webNavigation API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, webNavigation
Add event listeners for the various stages of a navigation. A navigation consists of a frame in the browser transitioning from one URL to another, usually (but not always) in response to a user action like clicking a link or entering a URL in the location bar.
569 webNavigation.TransitionQualifier API, Add-ons, Extensions, Non-standard, Reference, TransitionQualifier, Type, WebExtensions, webNavigation
Values of this type are strings. Possible values are:
570 webNavigation.TransitionType API, Add-ons, Extensions, Non-standard, Reference, TransitionType, Type, WebExtensions, webNavigation
Cause of the navigation: for example, the user clicked a link, or typed an address, or clicked a bookmark.
571 webNavigation.getAllFrames() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getAllFrames, webNavigation
Given a tab ID, retrieves information about all the frames it contains.
572 webNavigation.getFrame() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, getFrame, webNavigation
Retrieves information about a particular frame. A frame may be the top-level frame in a tab or a nested iframe, and is uniquely identified by a tab ID and a frame ID.
573 webNavigation.onBeforeNavigate API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onBeforeNavigate, webNavigation
Fired when the browser is about to start a navigation event.
574 webNavigation.onCommitted API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onCommitted, webNavigation
Fired when a navigation is committed. At least part of the new document has been received from the server and the browser has decided to switch to the new document.
575 webNavigation.onCompleted API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onCompleted, webNavigation
Fired when a document, including the resources it refers to, is completely loaded and initialized. This is equivalent to the DOM load event.
576 webNavigation.onCreatedNavigationTarget API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onCreatedNavigationTarget, webNavigation
Fired when a new window, or a new tab in an existing window, is created to host the target of a navigation. For example, this event is sent when:
577 webNavigation.onDOMContentLoaded API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onDOMContentLoaded, webNavigation
Fired when the DOMContentLoaded event is fired in the page. At this point the document is loaded and parsed, and the DOM is fully constructed, but linked resources such as images, stylesheets and subframes may not yet be loaded.
578 webNavigation.onErrorOccurred API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onErrorOccurred, webNavigation
Fired when an error occurs and the navigation is aborted. This can happen if either a network error occurred, or the user aborted the navigation.
579 webNavigation.onHistoryStateUpdated API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onHistoryStateUpdated, webNavigation
Fired when the page used the history API to update the URL displayed in the browser's location bar. All future events for this frame will use the updated URL.
580 webNavigation.onReferenceFragmentUpdated API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onReferenceFragmentUpdated, webNavigation
Events have three functions:
581 webNavigation.onTabReplaced API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onTabReplaced, webNavigation
Fired when the contents of the tab is replaced by a different (usually previously pre-rendered) tab.
582 webRequest API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, 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.
583 webRequest.BlockingResponse API, Add-ons, BlockingResponse, Extensions, Non-standard, Reference, Type, WebExtensions, webRequest
An object of this type is returned by event listeners that have set "blocking" in their extraInfoSpec argument.
584 webRequest.HttpHeaders API, Add-ons, Extensions, HttpHeaders, Non-standard, Reference, Type, WebExtensions, webRequest
An array of HTTP headers. Each header is represented as an object with two properties: name and either value or binaryValue.
585 webRequest.MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES API, Add-ons, Extensions, MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES, Non-standard, Property, Reference, WebExtensions, webRequest
The maximum number of times that handlerBehaviorChanged() can be called in a 10 minute period.
586 webRequest.RequestFilter API, Add-ons, Extensions, Non-standard, Reference, RequestFilter, Type, WebExtensions, webRequest
An object describing filters to apply to webRequest events.
587 webRequest.ResourceType API, Add-ons, Extensions, Non-standard, Reference, ResourceType, Type, WebExtensions, webRequest
This type is a string, which represents a particular kind of resource fetched in a web request.
588 webRequest.UploadData API, Add-ons, Extensions, Non-standard, Reference, Type, UploadData, WebExtensions, webRequest
Contains data uploaded in a URL request.
589 webRequest.handlerBehaviorChanged() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, handlerBehaviorChanged, webRequest
Suppose an extension's job is to block web requests against a pattern, and the following scenario happens:
590 webRequest.onAuthRequired API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onAuthRequired, webRequest
Fired when the server sends a 401 or 407 status code: that is, when the server is asking the client to provide authentication credentials such as a username and password.
591 webRequest.onBeforeRedirect API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onBeforeRedirect, webRequest
Fired when a server-initiated redirect is about to occur.
592 webRequest.onBeforeRequest API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onBeforeRequest, webRequest
This event is triggered when a request is about to be made, and before headers are available. This is a good place to listen if you want to cancel or redirect the request.
593 webRequest.onBeforeSendHeaders API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onBeforeSendHeaders, webRequest
This event is triggered before sending any HTTP data, but after all HTTP headers are available. This is a good place to listen if you want to modify HTTP request headers.
594 webRequest.onCompleted API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onCompleted, webRequest
Fired when a request has completed.
595 webRequest.onErrorOccurred API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onErrorOccurred, webRequest
Fired when a request could not be processed due to an error: for example, a lack of Internet connectivity.
596 webRequest.onHeadersReceived API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onHeadersReceived, webRequest
Fired when the HTTP response headers associated with a request have been received. You can use this event to modify HTTP response headers.
597 webRequest.onResponseStarted API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onResponseStarted, webRequest
Fired when the first byte of the response body is received.
598 webRequest.onSendHeaders API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, onSendHeaders, webRequest
This event is fired just before sending headers. If your extension or some other extension modified headers in onBeforeSendHeaders, you'll see the modified version here.
599 windows API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, Windows
Interact with browser windows. You can use this API to get information about open windows and to open, modify, and close windows. You can also listen for window open, close, and activate events.
600 windows.CreateType API, Add-ons, CreateType, Extensions, Non-standard, Reference, Type, WebExtensions, Windows
Specifies the type of browser window to create.
601 windows.WINDOW_ID_CURRENT API, Add-ons, Extensions, Non-standard, Property, Reference, WINDOW_ID_CURRENT, WebExtensions, Windows
The windowId for the current window.
602 windows.WINDOW_ID_NONE API, Add-ons, Extensions, Non-standard, Property, Reference, WINDOW_ID_NONE, WebExtensions, Windows
The windowId value that represents the absence of a browser window.
603 windows.Window API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, Window, Windows
Information about a browser window.
604 windows.WindowState API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, WindowState, Windows
The state of this browser window.
605 windows.WindowType API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, WindowType, Windows
The type of browser window this is.
606 windows.create() API, Add-ons, Create, Extensions, Method, Non-standard, Reference, WebExtensions, Windows
Creates a new window.
607 windows.get() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, Windows, get
Gets details about a window, given its ID. The details are passed into a callback.
608 windows.getAll() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, Windows, getAll
Gets information about all open windows, passing them into a callback.
609 windows.getCurrent() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, Windows, getCurrent
Gets the current browser window, passing its details into a callback.
610 windows.getLastFocused() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, Windows, getLastFocused
Gets the window that was most recently focused — typically the window 'on top' — and passes it into a callback.
611 windows.onCreated API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, Windows, onCreated
Fired when a window is created.
612 windows.onFocusChanged API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, Windows, onFocusChanged
Fired when the currently focused window changes. Will be windows.WINDOW_ID_NONE if all browser windows have lost focus.
613 windows.onRemoved API, Add-ons, Event, Extensions, Non-standard, Reference, WebExtensions, Windows, onRemoved
Fired when a window is closed.
614 windows.remove() API, Add-ons, Extensions, Method, Non-standard, Reference, WebExtensions, Windows, remove
Closes a window and all the tabs inside it, given the window's ID.
615 windows.update() API, Add-ons, Extensions, Method, Non-standard, Reference, Update, WebExtensions, Windows
Updates the properties of a window. Use this to move, resize, and (un)focus a window, etc.
616 Match patterns WebExtensions
Match patterns are a way to specify groups of URLs: a match pattern matches a specific set of URLs. They are for extensions using WebExtensions APIs in a few places, most notably to specify which documents to load content scripts into, and to specify which URLs to add webRequest listeners to.
617 Modify a web page WebExtensions
One of the most common use cases for an extension is to modify a web page. For example, an extension might want to change the style applied to a page, hide particular DOM nodes, or inject extra DOM nodes into the page.
618 Native messaging WebExtensions
Native messaging enables an extension to exchange messages with a native application installed on the user's computer. This enables native applications to provide a service to extensions without needing to be reachable over the web. One common example here is password managers: the native application manages storage and encryption of passwords, and communicates with the extension to populate web forms. Native messaging also enables extensions to access resources that are not accessible through WebExtension APIs, such as some particular piece of hardware.
619 Porting a Google Chrome extension WebExtensions
Extensions developed with WebExtension APIs are designed for cross-browser compatibility: to a large extent the technology is compatible with the extension API supported by Google Chrome and Opera. Extensions written for these browsers will in most cases run in Firefox with just a few changes. The process of porting an extension from Chrome or Opera is like this:
620 Porting a legacy Firefox extension WebExtensions
If you have developed a Firefox extension using XUL/XPCOM or the Add-on SDK, this page will help you migrate your extension to use WebExtensions APIs. The standard to build extensions for Firefox is to use
621 Prerequisites
All you need is Firefox 45 or higher. See Your first extension to get started.
622 Publishing your extension WebExtensions
Once you've finished writing and testing your extension, you'll probably want to share it with other people. Mozilla operates a website: addons.mozilla.org (commonly abbreviated to AMO), where developers can publish add-ons and users can find them. By publishing your extension on AMO, you can participate in our community of users and creators, and find an audience for your extension.
623 Temporary installation in Firefox WebExtensions
To install an extension temporarily:
624 Tips and Tricks
This page contains various tips and tricks which should be useful to many people developing extensions using WebExtension APIs.
625 User interface Landing, User Interface, WebExtensions
Extensions that use WebExtension APIs are provided with several user interface options so that their functionality can be made available to the user. A summary of those options is provided below, with a more detailed introduction to each user interface option in this section.
626 Address bar button User Interface, WebExtensions
Commonly referred to as a page action, this user interface option is a button added to the browser address bar. Users click the button to interact with your extension.
627 Address bar suggestions User Interface, WebExtensions
Using the omnibox API, extensions can customize the suggestions offered in the browser address bar's drop-down when the user enters a keyword.
628 Bundled web pages
You can include web pages in your extension to provide forms, help, or any other content your extension needs.
629 Context menu items WebExtensions
No summary!
630 Notifications WebExtensions
No summary!
631 Options page WebExtensions
No summary!
632 Popups User Interface, WebExtensions
No summary!
633 Sidebars WebExtensions
No summary!
634 Toolbar button WebExtension
Commonly referred to as a browser action, this user interface option is a button added to the browser toolbar. Users click the button to interact with your extension.
635 devtools panels Beginner, Guide, User Interface, WebExtensions
When an extension provides tools that are of use to developers, it's possible to add a UI for them to the browser's developer tools as a new panel.
636 What are extensions? WebExtensions
Extensions are bits of code that modify the functionality of a web browser. They are written using standard Web technologies - JavaScript, HTML, and CSS - plus some dedicated JavaScript APIs. Among other things, extensions can add new features to the browser or change the appearance or content of particular websites.
637 Working with files Guide, WebExtensions
Your browser extension may need to work with files to deliver its full functionality. This article looks at the five mechanisms you have for handling files:
638 Your first extension Guide, WebExtensions
In this article we'll walk through creating an extension for Firefox, from start to finish. The extension just adds a red border to any pages loaded from "mozilla.org" or any of its subdomains.
639 Your second extension WebExtensions
No summary!
640 manifest.json Add-ons, Extensions, WebExtensions
The manifest.json file is a JSON-formatted file, and is the only file that every extension using WebExtension APIs must contain.
641 applications Add-ons, Extensions, WebExtensions
The applications key contains keys that are specific to a particular host application.
642 author Add-ons, Extensions, WebExtensions
The extension's author, intended for display in the browser's user interface. If the developer key is supplied and it contains the "name" property, it will override the author key. There's no way to specify multiple authors.
643 background Add-ons, Extensions, WebExtensions
Use the background key to include one or more background scripts, and optionally a background page in your extension.
644 browser_action Add-ons, Extensions, WebExtensions
A browser action is a button that your extension adds to the browser's toolbar. The button has an icon, and may optionally have a popup whose content is specified using HTML, CSS, and JavaScript.
645 chrome_settings_overrides Add-ons, Extensions, WebExtensions, chrome_settings_overrides, manifest.json
Use the chrome_settings_overrides key to override certain browser settings. Two settings are available:
646 chrome_url_overrides Add-ons, Extensions, WebExtensions
Use the chrome_url_overrides key to provide a custom replacement for the documents loaded into various special pages usually provided by the browser itself.
647 commands Add-ons, Extensions, WebExtensions
Use the commands key to define one or more keyboard shortcuts for your extension.
648 content_scripts Add-ons, Extensions, WebExtensions
Instructs the browser to load content scripts into web pages whose URL matches a given pattern.
649 content_security_policy Add-ons, Extensions, WebExtensions
Extensions have a content security policy applied to them by default. The default policy restricts the sources from which they can load<script> and <object> resources, and disallows potentially unsafe practices such as the use of eval(). See Default content security policy to learn more about the implications of this.
650 default_locale Add-ons, Extensions, WebExtensions
This key must be present if the extension contains the _locales directory, and must be absent otherwise. It identifies a subdirectory of _locales, and this subdirectory will be used to find the default strings for your extension.
651 description Add-ons, Extensions, WebExtensions
A short description of the extension, intended for display in the browser's user interface.
652 developer Add-ons, Extensions, WebExtensions
The name of the extension's developer and their homepage URL, intended for display in the browser's user interface.
653 devtools_page
Use this key to enable your extension to extend the browser's built-in devtools.
654 homepage_url Add-ons, Extensions, WebExtensions
URL for the extension's home page.
655 icons Add-ons, Extensions, WebExtensions
The icons key specifies icons for your extension. Those icons will be used to represent the extension in components such as the Add-ons Manager.
656 incognito Add-ons, WebExtensions, incognito, manifest.json
Use the incognito key to control how the extension works with private browsing windows.
657 manifest_version Add-ons, Extensions, WebExtensions
This key specifies the version of manifest.json used by this extension.
658 name Add-ons, Extensions, WebExtensions
Name of the extension. This is used to identify the extension in the browser's user interface and on sites like addons.mozilla.org.
659 omnibox Add-ons, Extensions, WebExtensions
Use the omnibox key to define an omnibox keyword for your extension.
660 optional_permissions Add-ons, WebExtensions, manifest.json, optional_permissions
Use the optional_permissions key to list permissions which you want to ask for at runtime, after your extension has been installed.
661 options_ui Add-ons, Extensions, WebExtensions
Use the options_ui key to define an options page for your extension.
662 page_action Add-ons, Extensions, WebExtensions
A page action is an icon that your extension adds inside the browser's URL bar.
663 permissions Add-ons, Extensions, WebExtensions
Use the permissions key to request special powers for your extension. This key is an array of strings, and each string is a request for a permission.
664 protocol_handlers Add-ons, Extensions, WebExtensions, manifest.json
Use this key to register one or more web-based protocol handlers.
665 short_name Add-ons, Extensions, WebExtensions
Short name for the extension. If given, this will be used in contexts where the name field is too long. It's recommended that the short name should not exceed 12 characters. If the short name field is not included in manifest.json, then name will be used instead and may be truncated.
666 sidebar_action WebExtensions
A sidebar is a pane that is displayed at the left-hand side of the browser window, next to the web page. The browser provides a UI that enables the user to see the currently available sidebars and to select a sidebar to display.
667 theme Add-ons, Themes
Use the theme key to define a static theme to apply to Firefox.
668 version Add-ons, Extensions, WebExtensions
Version of the extension, formatted as numbers and ASCII characters separated by dots. For the details of the version format, see the Version format page.
669 web_accessible_resources Add-ons, Extensions, WebExtensions
Sometimes you will want to package some resources - for example, images, HTML, CSS, or JavaScript - with your extension, and make them available to web pages.
670 web-ext command reference Options, Reference, Tools, WebExtensions, commands, web-ext
This page lists all the commands and options available under the web-ext command line tool.
671 Code snippets Add-ons, Code snippets, Extensions
672 Alerts and Notifications Code snippets
non-modal notification and further interaction with users
673 Autocomplete Code snippets, Form Fill, Satchel
674 Bookmarks Code snippets, Developing Mozilla, Extensions, Places
675 Boxes Code snippets
Make the BOX style="display: block" and the wrapping behavior will occur when the box is resized:
676 Canvas code snippets Canvas, Code snippets, Graphics
677 Cookies Add-ons, Code snippets, Cookies, Extensions
678 Customizing the download progress bar
679 Delayed Execution Code snippets
680 Dialogs and Prompts Add-ons, Code snippets, Extensions, XUL
681 Downloading Files Code snippets
To download a file, create an instance of nsIWebBrowserPersist and call its nsIWebBrowserPersist.saveURI() method, passing it a URL to download and an nsIFile instance representing the local file name/path.
682 Drag & Drop Code snippets
683 Embedding SVG Code snippets
684 Examples and demos from articles
685 File I/O Add-ons, Code snippets, Extensions, Files, Streams, Tutorial
686 Finding window handles Add-ons, Code snippets, Extensions, XPCOM, js-ctypes
687 Forms related code snippets Code snippets, Forms
688 HTML in XUL for rich tooltips Code snippets, Examples, HTML, XUL
689 HTML to DOM Code snippets, DOM, Guide, HTML, Intermediate, NeedsUpdate
690 IsDefaultNamespace
691 JS XPCOM Code snippets, JavaScript, XPCOM, about:, nsIAboutModule
692 JavaScript Debugger Service Code snippets
693 JavaScript timers JavaScript timers, NeedsBetterPlace
694 JavaScript Daemons Management DOM, Guide, JavaScript, JavaScript timers, MakeBrowserAgnostic
695 Label and description Code snippets
696 LookupNamespaceURI
697 LookupPrefix
698 Miscellaneous Add-ons, Code, Code snippets, Extensions, Snippets
699 Modules
700 On page load Add-ons, Extensions
701 Page Loading Code snippets
702 Post data to window Add-ons, Extensions, NeedsContent
703 Preferences Add-ons, Code snippets, Extensions, Guide, Mozilla, Preferences
704 Progress Listeners Add-ons, Extensions
705 QuerySelector DOM
No summary!
706 Rosetta C, DOM, HTML, HTMLScriptElement, JavaScript, Non-JavaScript, Programming Languages
707 Running applications Add-ons, Code snippets, Extensions
708 SVG Animation NeedsContent
709 SVG General Code snippets
710 Scrollbar Code snippets
711 Sidebar Add-ons, Code snippets, Extensions
712 StringView Code snippet, Guide, JavaScript, JavaScript typed arrays, MDN JavaScript Libraries, Sample code, Typed Arrays, WebGL, WebSockets, js-ctypes
713 Tabbox
Assuming the tabbox, tabs, and tabpanels widgets with id's the same as their nodeName, this function will correctly remove the current tab and tab panel for the onclosetab tabs event:
714 Toolbar Add-ons, Code snippets, Extensions, Toolbars
715 Tree Code snippets
716 URI parsing
717 View Source for XUL Applications
718 Windows Add-ons, Code snippets, Extensions, Guide, NeedsContent, NeedsHelp
719 XML-related code snippets Add-ons, Code snippets, Extensions
720 xml:base support in old browsers Code snippets
721 XPath
722 getAttributeNS Code snippets
723 Creating OpenSearch plugins for Firefox Add-ons, Guide, OpenSearch, Search, Search plugins
Firefox supports the OpenSearch description format for search plugins. OpenSearch plugins are also compatible with Internet Explorer, Safari, and Chrome.
724 Creating an appealing add-on listing Add-ons, Beginner, Guide, WebExtension, publishing
There are two essential steps to getting people to use your add-on: they need to discover your add-on and open the listing page, then the listing page needs to encourage them to click the Add to Firefox button. The content you add to a listing is therefore vital: from making effective use of keywords in your descriptions, to get visibility in external search engine results, through having an icon that attracts a user’s attention from a category list, to screenshots that show how useful your add-on is.
725 Creating custom Firefox extensions with the Mozilla build system Add-ons, Build documentation, Developing Mozilla, Extensions, Guide, NeedsContent, XPCOM
There is a wealth of material on creating extensions for Firefox. All of these documents currently assume, however, that you are developing your extension using XUL and JavaScript only. For complex extensions, it may be necessary to create components in C++ that provide additional functionality. Reasons why you might want to include C++ components in your extension include:
726 Extension Etiquette Add-ons, Extensions, Guide
This article describes best practices when making extensions, including how to be kind to your users. It assumes that you are already familiar with Building an Extension.
727 Extension Packaging Add-ons, Extensions, Guide, Toolkit API
By the end of 2017 WebExtensions will be the only supported add-on type in Firefox. To learn how to install a WebExtension for testing purposes, see Temporary Installation in Firefox. To learn how to package a WebExtension for distribution, see Publishing your WebExtension.
728 Extensions support in SeaMonkey 2 Add-ons, CodingScripting, Extensions, JavaScript, SeaMonkey, URL, add-ons, thunderbird
Starting with SeaMonkey 2 Alpha 1 SeaMonkey supports toolkit/-style extensions. These type of extensions have many advantages for both users and developers compared to the old xpinstall/-style extensions.
729 Hotfix Extension
This document has been moved to the Add-ons wiki.
730 How to convert an overlay extension to restartless Add-ons, Code snippets, Extensions, Firefox, Firefox OS, Guide, Preferences system
First off, what kind of add-on are we talking about here? Well, XUL overlays and windows, JSM files, chrome & resource mappings with localization, default preferences, but no XPCOM components of your own. Some of that will have to be replaced and the rest will need to be loaded differently.
731 Index Add-ons, Glossary, Guide, Index
Found 882 pages:
732 Inline options Add-ons, Extensions, XUL
Firefox 7 supports a new syntax for defining extensions' preferences for both bootstrapped and traditional extensions. The user interface for the preferences defined with this new syntax appears in the extension's detail view in the Add-on Manager. This functionality originally appeared in Firefox mobile and is now available in Firefox on the desktop as well.
733 Install Manifests Add-ons, Extensions, Manifests, NeedsUpdate, Toolkit API
An Install Manifest is the file an Add-on Manager-enabled XUL application (e.g. Firefox or Thunderbird) uses to determine information about an add-on as it is being installed. It contains metadata identifying the add-on, providing information about who created it, where more information can be found about it, which versions of what applications it is compatible with, how it should be updated, and so on.
734 Installing extensions Add-ons, Extensions, Guide
If you are developing a native tool or application which ships with an associated extension for toolkit-based application, such as Firefox, your native tool can initiate the extension installation by copying the extension into a predefined directory on the user's computer.  The next time that the toolkit-based application (Firefox) is launched, the user will be asked to approve of the installation, and if the user approves, the extension will be automatically loaded for subsequent launches.  If the user has more than one profile, the approval and installation will occur on the next launch of each profile.
735 Interfacing with the Add-on Repository AMO, Add-on Manager, Add-ons
The Add-on Repository JavaScript code module makes it easy for your extension to interface with the AMO repository. You an use the code module to get lists of add-ons and even install new add-ons. This article provides some sample code that queries the recommended add-ons list on AMO and lets the user click a button to install an add-on from the list.
736 Legacy Add-ons Add-ons, Extensions, Landing
This section contains links to documentation for legacy technology for add-on development, including:
737 Legacy extensions for Firefox for Android
Add-ons that work with desktop Firefox do not automatically work in Firefox for Android:
738 API
There are a couple of differences between desktop Firefox and Firefox for Android that are particularly relevant to add-on developers:
739 Accounts.jsm
The Accounts API lets you check whether a Firefox Account or a legacy Sync account is currently present on the device, and to start the Firefox Account set-up process if an account is not present. Accounts is a single object that provides a Promise-based API.
740 BrowserApp Apps, CodingScripting, Firefox, Glossary, Guide, Mobile, add-on
Add-ons running on desktop Firefox can use the global gBrowser variable to interact with tabs and any HTML content they host. This object isn't available on Firefox for Android, and instead add-ons should use the BrowserApp object, which provides much of the same functionality.
741 addTab
BrowserApp.addTab() opens a new tab. By default, the new tab is made the selected tab.
742 closeTab
BrowserApp.closeTab(tab) closes the supplied tab. If no other tabs are open, then the tab is not closed.
743 deck
deck is a property of the BrowserApp object. It is a deck of all currently open browsers, represented as browser objects.
744 getBrowserForDocument
BrowserApp.getBrowserForDocument() retrieves a browser, given the DOM document hosted by that browser.
745 getBrowserForWindow
BrowserApp.getBrowserForWindow() retrieves a browser, given the DOM content window hosted by that browser.
746 getTabForBrowser
BrowserApp.getTabForBrowser() retrieves a tab, given the XUL browser object hosted by that tab.
747 getTabForId
BrowserApp.getTabForId() retrieves a browser tab, given its unique ID.
748 getTabForWindow
BrowserApp.getTabForWindow() retrieves a browser tab, given the DOM window hosted by that tab.
749 loadURI
BrowserApp.loadURI(uri, browser, params) loads the specified URI into the specified browser.
750 quit Apps, Firefox, Mobile, NeedsContent
BrowserApp.quit() closes the browser.
751 selectTab Mobile, NeedsContent, Reference, Référence
BrowserApp.selectTab(tab) makes the supplied tab the currently selected tab.
752 tabs Apps, CodingScripting, Firefox, JavaScript, Mobile
tabs is a property of the BrowserApp object. It is an Array of all currently open tabs, represented as Tab objects.
753 HelperApps.jsm
754 Home.jsm
The Home.jsm JavaScript code module offers utility routines dealing with customizing the home page in Fennec. This is the page that's shown on startup and new tabs, as well as when the user enters "editing mode" from the urlbar. To use it, you first need to import the code module into your JavaScript scope:
755 banner API, Glossary, Guide, JavaScript
The Home.banner API lets you customize a banner that appears at the bottom of the home page. You can use this API to add and remove messages from the set of messages that rotate through this banner.
756 panels API, CodingScripting, Firefox, Glossary, Guide, JavaScript, Mobile, add-on
Use the Home.panels API to add custom panels to the browser's home page.
757 HomeProvider.jsm
The HomeProvider API lets you store data that can be displayed in custom panels on the home page. HomeProvider is a single object that manages access to data and data syncing.
758 HomeStorage
Each HomeStorage object is associated with a single dataset. This object is used to save and delete data. Consumers can retreive a HomeStorage object through the HomeProvider API.
759 NativeWindow
The NativeWindow object enables Firefox for Android add-ons to create user interface components.
760 contextmenus API, Reference, Référence
Returns a reference to the NativeWindow.contextmenus object, which can be used to add items to the Firefox for Android context menu, and subsequently remove them. You can add a menu item to the context menu using NativeWindow.contextmenus.add() and remove it using NativeWindow.contextmenus.remove().
761 add API, CodingScripting, Firefox, Guide, JavaScript, Mobile, add-on
NativeWindow.contextmenus.add() adds a new context menu item to Firefox for Android.
762 remove API, CodingScripting, Firefox, JavaScript, Mobile, add-on
NativeWindow.contextmenus.add() adds an item to the context menu in Firefox for Android, returning an ID for the item. To remove the item, use NativeWindow.contextmenus.remove(), passing in the item's ID.
763 doorhanger Add-ons, Extensions, Mobile, Reference, Référence
Returns a reference to the NativeWindow.doorhanger object, which can be used to display doorhanger notifications (also known as popup notifications) on Firefox for Android.
764 menu API, Reference, Référence
Returns a reference to the NativeWindow.menu object, which can be used to add items to the main Firefox for Android menu, and subsequently remove them. You can add a menu item to a browser window using NativeWindow.menu.add() and remove it using NativeWindow.menu.remove().
765 add NativeWindow, Reference, Référence, menu
NativeWindow.menu.add() adds a new item to the main menu in Firefox for Android. By specifying an optional parent attribute, a menu item can be added to the submenu of the parent.
766 remove
NativeWindow.menu.add() adds an item to the main menu in Firefox for Android, returning an ID for the item. To remove the item, use NativeWindow.menu.remove(), passing in the item's ID.
767 update Extensions, Fiferox for Android, NativeWindow
NativeWindow.menu.add() adds an item to the main menu in Firefox for Android, returning an ID for the item. To update the item, use NativeWindow.menu.update(), passing in the item's ID and a set of attributes to update.
768 toast Add-ons, CodingScripting, Firefox, Guide, JavaScript, Mobile
Returns a reference to the NativeWindow.toast object, which can be used to display toast notifications on Firefox for Android.
769 show API, Add-ons, CodingScripting, Firefox, Glossary, Guide, JavaScript, Mobile, toast
NativeWindow.toast.show() displays a toast notification on Firefox for Android.
770 Notifications.jsm
The Notifications.jsm JavaScript code module offers utility routines dealing with showing system notifications in Fennec. It duplicates some of what is available in the nsIAlertService already, but exposes to more advanced Android functionality.
771 PageActions.jsm
Contains the PageActions object, which can be used to add items to the Firefox for Android url/title bar, and subsequently remove them. You can add an item using PageActions.add() and remove it using PageActions.remove(). Import the script by inserting:
772 Prompt.jsm
773 RuntimePermissions.jsm
Contains the RuntimePermissions object, which can be used to check whether one or more runtime permissions have been granted to Firefox for Android, and to ask for them if they have not.
774 Snackbars.jsm
Contains the Snackbars object, which can be used to show notifications to let users know that some change has been made.
775 Sound.jsm
The Sound.jsm JavaScript code module offers the ability to play sounds simply using the HTML 5 audio APIs under the hood. For basic usage, see the Github readme.
776 Tab API, Add-ons, CodingScripting, Firefox, Mobile, Tab
The Tab object represents a browser tab, and provides access to the browser and the DOM content window hosted by that tab.
777 Addons developer guide install, xpi
This guide walks you through the steps needed to make a restartless add-on for Firefox on Android. If you are familiar with building add-ons for desktop Firefox, much of this guide will be review. Firefox on Android uses native Android widgets for the browser UI so the big difference is how you interact with the browser UI.
778 Code snippets
This article includes code snippets to help you write an add-on for Firefox for Android. For additional code samples, check out the Firefox for Android Add-ons Github repo.
779 Creating a User Interface
See the NativeWindow documentation for examples the APIs Firefox for Android add-ons can use to create user interface components.
780 Firefox Hub Walkthrough
This guide walks you through developing a Firefox Hub add-on for Firefox for Android. The Firefox Hub APIs allow add-ons to add new content to the Firefox for Android home page. These APIs are new in Firefox 30, and increased capabilities are planned for future releases. The two main APIs that this guide covers are the Home.panels API and the HomeProvider API. For some example code to get started, you can copy the hub boilerplate add-on from github.
781 Initialization and Cleanup
Android add-ons don't have to be restartless, but with Firefox for Android you can't use XUL overlays to create your user interface, so there's much less incentive to write overlay-based add-ons.
782 Prerequisites Extensions, Mobile
While you're developing your add-on, it will be very important to have a way to test and run snippets of code; development will go very slowly if you have to build and install your entire app every time you need to test something. Once all of your snippets are working together, then you can start worrying about bringing together all of the add-on files to build the complete app (bootstrap.js, etc.). You can do this using WebIDE, by connecting your device to your development workstation.
783 Walkthrough Extensions, Mobile
This guide walks you through the process of developing a simple add-on for Firefox for Android. The add-on adds a menu item to display the source of the current web page.

If you're familiar with developing add-ons for desktop Firefox, much of this guide will not be new to you.
784 WebExtensions for Firefox for Android Landing, Mobile, WebExtensions
This section provides information specific to developing extensions using WebExtension APIs for Firefox for Android. General information on extensions development is in main extensions section. If you have not developed extensions before, consider starting with the guides to building extensions for desktop, such as the guide to building Your first extension.
785 Overlay extensions Add-ons, Extensions, Landing
This page contains links to documentation for the approach to developing extensions for Gecko-based applications which uses:
786 Firefox addons developer guide Add-ons, Extensions, Firefox, Guide
The Firefox add-ons developer guide was contributed by the Mozilla Japan community; it covers how to go about building Firefox extensions using XPCOM and XUL. These days, we recommend using the Add-on SDK instead, but there are times when you need the additional control offered by a more direct approach.
787 Appendix: What you should know about open-source software licenses
No summary!
788 Chapter 1: Introduction to Extensions
This document was authored by Hideyuki Emura and was originally published in Japanese for the Firefox Developers Conference Summer 2007. Emura-san is a co-author of Firefox 3 Hacks (O'Reilly Japan, 2008.)
789 Chapter 2: Technologies used in developing extensions
This document was authored by Hiroshi Shimoda of Clear Code Inc. and was originally published in Japanese for the Firefox Developers Conference Summer 2007. Shimoda-san is a co-author of Firefox 3 Hacks (O'Reilly Japan, 2008).
790 Chapter 3: Introduction to XUL—How to build a more intuitive UI Firefox, XUL
learn about XUL, the XML-based User-interface Language, which is one of the building blocks for extensions.
791 Chapter 4: Using XPCOM—Implementing advanced processes
This chapter explains how to use XPCOM to implement advanced processes using only JavaScript.
792 Chapter 5: Let's build a Firefox extension Archive, Obsolete
This document was authored by Taiga (Gomita) Gomibuchi and was originally published in Japanese for the Firefox Developers Conference Summer 2007. Gomita-san won "Most Useful Upgraded Extension" award in Mozilla's 2006 "Extend Firefox" competition for ScrapBook, and was runner-up in the "Extend Firefox 2" contest for FireGestures.
793 Chapter 6: Firefox extensions and XUL applications
This chapter discusses tools to assist in developing extensions.
794 License and authors
License: Attribution-Share Alike 2.1 Japan.
795 XUL School Tutorial Add-ons, Extensions, References, Tutorials, XUL
XUL School is a comprehensive add-on development tutorial, focusing on Firefox extension development. It is recommended that you read through all of it at least once. While Firefox changes rapidly, the content in this tutorial should be up to date and valid.
796 Adding Events and Commands Add-ons, CodingScripting, DOM, Glossary, Guide, JavaScript, XUL, events
Just like with HTML, most JavaScript code execution is triggered by event handlers attached to DOM elements. The most commonly used event is the onload event, which is used in overlays and other windows to detect when the window has loaded and then run initialization code:
797 Adding Toolbars and Toolbar Buttons Toolbars, XUL
Adding new toolbars to Firefox is easy, but adding them the wrong way is very easy as well.
798 Adding menus and submenus Add-ons, CodingScripting, Macs, XUL, apple
The Hello World example in the previous sections shows the two most common ways to add menus. In this section we'll look into more specialized menus and what you can do with them.
799 Adding sidebars
The sidebar in Firefox is a relatively large and flexible space to add rich interfaces without requiring new windows or complicated overlays. Sidebars take as much space as the user wants them to, and provide a frame where you can add elaborate data and controls. You're probably familiar with the Bookmarks and History sidebars. If not, you can open either one from the View > Sidebar menu. They also have shortcuts to open or close them using the keyboard.
800 Adding windows and dialogs
To open a new window, use the Javascript window.open function just like with HTML windows.
801 Appendix A: Add-on Performance Add-ons, Extensions, Performance
Add-ons can have a noticeable performance impact on Firefox. This is evident when opening a Firefox profile that has many add-ons installed; some profiles can take minutes to load, which is a serious inconvenience for users that gives them a negative view of Firefox. Add-on developers need to make sure that they minimize their add-ons' performance impact, and here are a few simple guidelines that should be followed to achieve that.
802 Appendix B: Install and Uninstall Scripts
Add-ons normally run code at startup, and as it is covered in the main tutorial, all you need is a load event handler and a little code. It is also common for an add-on to require to run a script only when it is installed for the first time, or every time it is updated. It can be used to write or copy necessary files to the profile folder, like the initial DB the add-on will use for storage. A few others require cleanup code to be run after the add-on is uninstalled. This appendix covers these cases with simple code that should work for most add-ons.
803 Appendix C: Avoiding using eval in Add-ons
Using eval in add-ons is almost always unnecessary, and many times even a security vulnerability. Moreover, code using eval is harder to parse for a human mind, is often pretty complex, and relies on assumptions that are not necessarily true in the future or even now.
804 Appendix D: Loading Scripts Extensions, XUL
Most add-ons and XUL Runner applications provide their primary functionality by loading and executing JavaScript code. Because there are such a diverse array of add-ons, and because the needs of developers have grown organically over time, the Gecko runtime provides a number of means to dynamically load and execute JavaScript files. Each of these means has its own advantages and disadvantages, as well as its own quirks which may trap the unwary. Below is an overview of the more common means of loading scripts, along with some of their primary advantages, disadvantages, quirks, and use cases.
805 Appendix E: DOM Building and Insertion (HTML & XUL)
Many add-ons need to dynamically generate DOM content, either XUL or HTML, from their scripts. For security reasons, and to prevent errors, care needs to be taken to avoid evaluating arbitrary text as HTML. Failure to do so can lead to execution or remote scripts, and in the worst cases to privilege escalation which can leave a user's PC open to remote attack.
806 Appendix F: Monitoring DOM changes
DOM mutation events were introduced to HTML several years ago in order to allow web applications to monitor changes to the DOM by other scripts. Unfortunately, adding listeners for any of these events to a document has a highly deleterious effect on performance, an effect which is not mitigated in the slightest by later removing those listeners. For this reason, it is best to avoid using mutation listeners at all costs, especially from extensions. This document lays out some alternatives which do not have such severe performance impacts.
807 Connecting to Remote Content
XMLHttpRequest is an API for transferring XML between a local script and a remote server via HTTP. It is an integral part of the modern web, and all major browsers support it. Besides XML, it can be used to retrieve data in other formats, for example JSON, HTML and plain text. In this section we'll look into the XML and JSON communication mechanisms.
808 Custom XUL Elements with XBL
Taken from the XBL page.
809 Getting Started with Firefox Extensions Extensions
an extension is a small application that adds something new to one or more Mozilla applications. This tutorial focuses on extensions for Firefox, but the same (or very similar) principles apply to creating extensions for other applications such as Thunderbird, Seamonkey, and Flock.
810 Handling Preferences Add-ons, Extensions, XUL, XUL School
Mozilla applications are highly customizable. Preferences are used to store settings and information to change their default behavior. To open the preferences window in Firefox, select the following from the main menu:
811 Intercepting Page Loads
There are several ways to detect and intercept loading of web pages and their content, be it only to realize when it happens, modify their contents, or to block them and do something else instead. Some of the techniques presented here apply only to content loaded in the main browser area, while others detect content being loaded in other XUL windows, or even detect XUL content being loaded. Also, the different techniques tap into different steps of the load process. Which one you should use solely depends on your needs. We will start with the simplest one, which is also the most common to use.
812 Introduction
Welcome to the XUL School Tutorial!
813 JavaScript Object Management JavaScript, Object, Tutorials
In this section we'll look into how to handle JavaScript data effectively, beginning with chrome code, in ways which will prevent pollution of shared namespaces and conflicts with other add-ons resulting from such global namespace pollution.
814 Local Storage Guide, Storage, XUL
It is very common for an extension to require some kind of local persistent storage. We recommend that you at least keep an error log, so that you can request error data from your users when you encounter problems that are hard to debug. We'll discuss logging in this section, but first let's look at the right (or at least, common and scalable) way of managing local files.
815 Mozilla Documentation Roadmap
Firefox extension development is still an immature discipline, with a developer base consisting mostly of hobbyists and just a few organized development groups. There's a great deal of free online documentation available on XUL and extension development, but finding it and turning it into useful information can be a daunting task. Knowing where to look is critical and non trivial. This tutorial was aimed at compiling all the right resources for extension development and putting them in the right context, but there's much more to learn, and knowing how to find it is part of what we felt was necessary to teach.
816 Observer Notifications
Sometimes you need your code to send a message to other parts of your code. For example, you might want to notify that a task is completed, and then several different actions must be performed. You could do that by calling all those functions directly, but XPCOM offers you a better and cleaner way to achieve that using observers and the observer service.
817 Setting Up a Development Environment
There are 3 tools that we think are essential for effective add-on development (or any kind of development, really): a source code editor, a source control system, and a build system.
818 The Box Model
In order to master XUL, you'll need to have a fairly good understanding of its Box Model. This is the system that determines how all elements are laid out visually in a XUL document. It is important to know how it works in order to make interfaces that are easy to localize, skin and use in different types of operating systems, screen sizes and resolutions.
819 The Essentials of an Extension
In the last section we looked at the contents of the Hello World extension. Now we'll look into its files and code, starting with the install.rdf file. You can open it with any text editor.
820 Useful Mozilla Community Sites
The Mozilla Community is very rich and active. It's a very powerful tool you have when developing on top of the Mozilla platform, and you should take advantage of it in order to create a truly successful add-on .
821 User Notifications and Alerts
It is often the case that extensions need to notify users about important events, often requiring some response. Using modal dialogs and alerts is usually a bad idea. They interrupt the user's workflow, demanding immediate action before anything else can be done. Users will find them annoying and probably will learn to dismiss them as quickly as possible without even reading what they have to say. Or they will just get rid of your add-on.
822 XPCOM Objects
Taken from the XPCOM page.
823 Performance best practices in extensions Add-ons, Best practices, Extensions, Guide, NeedsContent, NeedsExample, Performance
One of Firefox's great advantages is its extreme extensibility. Extensions can do almost anything. There is a down side to this: poorly written extensions can have a severe impact on the browsing experience, including on the overall performance of Firefox itself. This article offers some best practices and suggestions that can not only improve the performance and speed of your extension, but also of Firefox itself.
824 Security best practices in extensions Add-ons, Best practices, Extensions, Guide, Security
This document is intended as a guide for developers to promote best practices in securing your extension. Your goal is to keep your users safe. Some items mentioned are strict guidelines, meaning that if you don't follow them then your add-on will not be approved on Mozilla add-ons. Other items are recommendations. The difference will be clearly flagged.
825 Setting up an extension development environment Add-ons, Extensions, Guide
This article provides suggestions for how to set up your Mozilla application for extension development. These details apply to Firefox, Thunderbird, and SeaMonkey (version 2.0 and above).
826 Signing and distributing your add-on
Once you have a first build of your add-on, you'll want to distribute it so others can give it a try. Whether you are distributing your add-on publicly or privately, through addons.mozilla.org (AMO) or elsewhere, you'll want to have your add-on package signed.
827 Submitting an add-on Add-ons, Tutorial, WebExtensions
This article walks you through the process of submitting an add-on. If you are just looking to submit your add-on, click here
828 Source Code Submission Add-ons, Review Policy, add-ons
When uploading extensions to addons.mozilla.org (AMO), you are given the option to attach source code. There are certain cases where this is required, but others where it is not recommended. This page will explain when and where source code should be uploaded, and how to provide reviewers with instructions on reading your source code. Providing clear instructions to the reviewer will help you get a speedier review for your add-on.
829 Techniques
.
830 Promises Add-ons, Examples, Snippets, async
Due to the performance and stability costs of synchronous IO, many APIs which rely on it have been deprecated. The following page contains examples of many Promise-based replacement APIs for common operations. These APIs allow asynchronous operation to be achieved with a coding style similar to synchronous variants.
831 Themes Add-ons, Look & Feel, Themes
Themes allow you to change the look and feel of the user interface and personalize it to your tastes. Learn how to create and share themes!
832 Create Your Own Firefox Background Theme
No summary!
833 Lightweight themes Add-ons, Lightweight themes, Personas, Themes
No summary!
834 Frequently Asked Questions for Lightweight themes
Lightweight themes are easy-to-install, easy-to-use skins that change the look of your Firefox web browser. There are hundreds of thousands community-designed themes to choose from, with more added every day. Start looking here for designs that fit your style.
835 Obsolete
This page contains theme documents and resources that we don't expect will ever be updated, but which we're keeping for the time being as potential source material for updated docs.
836 Theme concepts Theme, add-on
WebExtension based themes in Firefox enable you to change the look of the browser by adding images to the header area of the Firefox browser; this is the area behind the menu bar, toolbars, address bar, search bar, and tab strip.
837 Thunderbird extensions Add-ons, Extensions, thunderbird
Categories
838 Adding items to the Folder Pane
This tutorial examines how to add items to an existing Folder Pane view. The result is a javascript file that will add a "Numbers" container to the end of Thunderbird's "All Folders" mode. That container will have 3 child-items, the numbers 1, 2, and 3. Clicking on those items will display the number in the main viewing pane of Thunderbird.
839 Adding views to the Folder Pane
This is a stub page for a tutorial for Thunderbird 3.
840 An overview of Thunderbird components thunderbird
The Thunderbird mail application is a group of components built on a set of technologies that can seem daunting to new developers. However, in many cases you only need to learn a few concepts to write an extension.
841 Building a Thunderbird extension 1: introduction Add-ons, Extensions, add-ons, thunderbird
Thunderbird is Mozilla's open-source email application. It shares many of the technologies used by Firefox, including JavaScript, the Gecko layout engine, the XUL XML User Interface Language and the XPCOM Cross-Platform Component Object Model. Similar to Firefox, Thunderbird functionality can be enhanced and customized via extensions.
842 Building a Thunderbird extension 2: extension file layout Extensions, thunderbird
Extensions are packaged and distributed in archive files (also known as Bundles), with the XPI (pronounced “zippy”) file extension. At a minimum, they contain an install.rdf, the chrome.manifest and a chrome/ folder. The chrome/ folder contains a content/ folder that contains the actual content files. These files contain the code that makes your extension actually do something. When this tutorial is finished, our extension will look like this:
843 Building a Thunderbird extension 3: install manifest Extensions, thunderbird
The install.rdf file is an XML file that provides general information about the extension.
844 Building a Thunderbird extension 4: chrome manifest Extensions, thunderbird
The file called chrome.manifest tells Thunderbird what packages and overlays are provided by the extension. Open the file called chrome.manifest that you created and add this code:
845 Building a Thunderbird extension 5: XUL Extensions, thunderbird
Thunderbird's user interface is written in XUL and JavaScript. XUL is an XML grammar that provides user interface widgets like buttons, menus, toolbars, trees etc. We add widgets by inserting new XUL DOM elements into the application window and modify them using scripts and attaching event handlers. While XUL provides the elements of the user interface, actions are written in JavaScript.
846 Building a Thunderbird extension 6: Adding JavaScript
In this step we will create a small piece of JavaScript code that inserts the current date into our statusbar widget. Depending on the installed theme the result will look something like this:
847 Building a Thunderbird extension 7: Installation Extensions, thunderbird
While you are developing the extension, there are two ways you can make Thunderbird load it so you can test it as you go. You can either put the folder with the extension files directly into Thunderbird's extensions folder, or you can put a file there that tells Thunderbird where your extension is located. (In step 8 you will learn how to package an .xpi file for distribution and installation.)
848 Building a Thunderbird extension 8: packaging Extensions, thunderbird
When you are satisfied with how your extension works, package it for deployment and installation.
849 Building a Thunderbird extension 9: distributing Extensions, thunderbird
The addons.mozilla.org site is a distribution site where you can host your extension for free. Your extension will be hosted on Mozilla's mirror network. Mozilla's site also provides users with easier installation and will automatically make new versions available to users of your existing versions when you upload them. In addition Mozilla Update allows users to comment and provide feedback on your extension. It is highly recommended that you use AMO to distribute your extensions.
850 Creating a Custom Column Add-ons, Extensions, add-ons, thunderbird
In this example we will be developing a small extension that will be adding a column that will display the "Reply-To:" field of an email (if it exists, it if often not set). If you are unfamiliar with the setup and creation of an extension please read Building a Thunderbird Extension.
851 Demo Addon
This demo add-on has been created by Jonathan Protzenko for his presentation at MozCamp 2011. It shows how to achieve various goals in a working live example, such as working with Gloda.
852 Error reporting tools thunderbird
Currently, Thunderbird tends to eat a lot of exceptions. Some make it to the error console, most don't. There are deep fixes to the platform needed (e.g. bug 493414), but in the meantime, it would be helpful to be able to get useful output on stderr about exceptions, events and pretty-printed objects.
853 FAQ Add-ons, Extensions, add-ons, thunderbird
The old contents of this FAQ page were duplicated in the Setting up extension development environment article and the Building a Thunderbird extension article. (Duplicate content has been removed from this page.)
854 Finding the code for a feature Add-ons, Extensions, add-ons, thunderbird
Frequently you are trying to figure out the code that implements a specific feature of the user interface. How do you find that out? As an example, I received the following inquiry, and I decided to follow my usual path and document what I do:
855 Styling the Folder Pane
The folder pane in Thunderbird is predominantly controlled by code in folderPane.js. Since Thunderbird 3, the folder pane is designed in a more modular and extensible fashion. It is now possible to place non-mail entities in the folder pane.
856 Theme Packaging Add-ons, Themes, Toolkit API
This document describes how to package themes for Thunderbird.
857 Thunderbird HowTos Add-ons, Extensions, add-ons, thunderbird
Please add questions or answers to this page so that other people can benefit from your work. Also, you will see that there are many topics for which there is a question, but no answer. Please help by adding an answer! (Adding another question helps too!)
858 Activity Manager examples
The Activity Manager is a simple component that understands how to display a combination of user activity and history. See the Activity Manager page for a general description of the component. See the Activity Manager interfaces page for an overview of the related interfaces.
859 Common Thunderbird Extension Techniques thunderbird
No summary!
860 Access StringBundle from Overlay thunderbird
No summary!
861 Access Thunderbird Window Areas thunderbird
To access particular parts of the Thunderbird window you can use these helper methods. An alternative to these methods is to directly access the element by it's ID as in the Detect When a Folder Opens example.
862 Access Window missing, thunderbird
The window object represents the Window of the Thunderbird application as well as the currently opened tabs. You can do many things with the window object, such as accessing the height or width of the window/tab or setting its title, registering timer events and much more. The Window API will give you the complete details. Since window is a global variable you can use it directly from your JavaScript file.
863 Access Window Area NeedsUpdate, missing, thunderbird
This page has no content. Enrich MDC by contributing.
864 Add New Tab missing, thunderbird
No summary!
865 Add Option to Context Menu incomplete, thunderbird
Assuming this on chrome.manifest:
866 Add Tab NeedsUpdate, missing, thunderbird
This page has no content. Enrich MDC by contributing.
867 Add Toolbar Button
Example XUL overlay file:
868 Create Custom Column thunderbird
The article "Creating a Custom Column" will get you well on the road to creating your own columns and populating them with custom data. The customDBHeaders Preference article provides information on a preference setting that exposes custom header data for use in a custom column within Thunderbird's main view.
869 Detect Opening Folder thunderbird
Some actions require execution every time you open a folder (for example, registering a custom column handler. To do this you need to capture the select event of the folder [[XUL:tree|tree]] whose id is (conveniently) folderTree like so:
870 Filter Incoming Mail filter, incoming, mails, thunderbird
To filter incoming mail, the first step is to detect new messages inconming. The, you've got Components.interfaces.nsIMsgDBHdr from where you can modify the mail. By example, to modify the mail subject :
871 Get Thunderbird version thunderbird
On Thunderbird version 3.0b3pre and later, you can use the following snippet to get the Thunderbird version. (Version 3.0b3pre was the first build to include STEEL.)
872 Modify Folder Pane Display missing, thunderbird
See https://addons.mozilla.org/en-US/thu...er-categories/ for an example.
873 Modify Message List NeedsContent, NeedsUpdate, missing, thunderbird
This page has no content. Enrich MDC by contributing.
874 Use SQLite thunderbird
If you'd like to use an SQLite database in your extension you'll need to look over the Storage docs for an API reference, however this code should get you started. Be careful of multi-thread access to your database.
875 Folders and message lists Guide, thunderbird
The FolderDisplayWidget for the current folder can be accessed via the global variable gFolderDisplay. This object provides many of the functions required for working with folder views. We'll look at some of them below.
876 Thunderbird developer reference docs
No summary!
877 Tips and Tricks from the newsgroups thunderbird
The following discussions on mozilla.dev.apps.thunderbird and mozilla.dev.extensions include useful tips for Thunderbird add-on developers. Please feel free to add links to threads. We will add a categorization system as the link list grows. You can also help by creating how-tos from any of these topics.
878 Working with the Folder Pane Add-ons, Extensions, add-ons, thunderbird
The "Folder Pane" refers to the main navigation element that appears on the left side of the main Thunderbird window. Here, users traditionally find a hierarchical view of their accounts and folders. Beginning in Thunderbird 2, additional views on those folders ("Recent Folders", "Favorite Folders", and "Unread Folders") were added, accessible via the scroll-arrows at the top of the pane.
879 customDBHeaders Preference
developing a custom column to display a 'Superfluous' column within Thunderbird's main view. The data will come from a custom header labeled X-Superfluous
880 Updates
Firefox supports automated updates to add-ons using JSON update manifests. Add-ons hosted on AMO automatically receive updates to new versions posted there. Other add-ons must specify the location of their update manifests.
881 Working with multiprocess Firefox
In older versions of Firefox, chrome code (including code inserted by extensions) and content run in the same operating system process. So extensions can access content directly:
882 Using the message manager from Firefox extensions
This article explains how to refactor a Firefox extension to use the message manager. This enables the extension to work in multiprocess Firefox.

Document Tags and Contributors

 Contributors to this page: wbamberg, dkocho4, fscholz
 Last updated by: wbamberg,