Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Index

Found 887 pages:

# Page Tags and summary
1 Add-ons Add-ons, Extension, Extensions, Landing, Mozilla, add-ons, extension
Add-ons allow developers to extend and modify the functionality of Firefox.
2 AMO
Content to be added.
3 AMO Policies
Mozilla is committed to ensuring a great add-ons experience for our users and developers. Please review the policies below before submitting your add-on.
4 AMO Add-on Maintenance Policies
Add-on updates, transferring ownership, user reviews, and what to expect once your add-on is approved.
5 AMO Contact Information
How to get in touch with us regarding these policies or your add-on.
6 AMO Featured Add-ons Policies
How up-and-coming add-ons become featured and what's involved in the process.
7 AMO Review Policies
What happens after your add-on is submitted? Learn about how our Editors review submissions.
8 AMO Submission Policies
Find out what is expected of add-ons we host and our policies on specific add-on practices.
9 Firefox Add-on Distribution Agreement
Effective January 5, 2016
10 Review Policies Add-ons, Review Policy, add-ons
In order to protect the safety and sovereignty of Firefox users, Mozilla requires all add-ons to comply with a set of policies on acceptable practices. The exact set of applicable policies varies depending on a number of circumstances, the most important being whether the add-on is hosted on addons.mozilla.org (hereafter AMO), and how the add-on is distributed in the wild.
11 Add-ons Manager API AMO, AMO API, Add-ons, Reference, add-ons
API calls are served by accessing https://services.addons.mozilla.org/api/.
12 Add-on Debugger Advanced, Debugging, Developer, Firefox, Guide, Howto, JavaScript, add-on, debugging, guide
The Add-on Debugger lets you run a subset of the Firefox developer tools in the context of your add-on:
13 Add-on Manager Add-on Manager, Add-ons, Guide
The Add-on Manager is responsible for managing all of the add-ons installed in the application. Through its APIs information about all installed add-ons can be retrieved and new add-ons can be installed. The APIs are designed to be generic and support many different types of add-ons.
14 Addon Add-on Manager, Add-ons, Extensions, Guide, NeedsContent
An Addon represents an add-on that is either installed or can be installed. Instances can be created using the many getAddon methods on the AddonManager object.
15 AddonAuthor Add-on Manager, Add-ons
Technical review completed.
16 AddonInstall Add-on Manager, Add-ons, Extensions, Reference, Référence
Technical review completed.
17 AddonListener Add-on Manager, Add-ons, Reference, Référence
AddonListeners can be registered with AddonManager.addAddonListener() and will then receive notification of changes to the add-ons currently installed. These notifications come in the form of calls to methods on the listener object. A listener only needs to implement the methods corresponding to the events it cares about; missing methods will not cause any problems.
18 AddonManager Add-on Manager, Add-ons, Interfaces, Interfaces:Scriptable, Reference, Référence, add-ons
The AddonManager object is the global API used to access information about add-ons installed in the application and to manipulate them. The majority of the methods are asynchronous meaning that results are delivered through callbacks passed to the method. The callbacks will be called just once but that may be before or after the method returns.
19 AddonScreenshot Add-on Manager, Add-ons
A screenshot object for an add-on can have following attributes.
20 AddonType
Add-on types hold useful information about each type of add-on that may be installed. They are mostly used to help the UI know how to display the different types of add-on.
21 AddonUpdateChecker Add-on Manager, Add-ons, Reference, Référence
The AddonUpdateChecker is used to download and parse update information for an add-on's update manifest. If all you care about is finding the newest version for an Addon then you probably want to use Addon.findUpdates() instead.
22 Code Samples Add-on Manager, Add-ons, Examples
Technical review completed.
23 InstallListener Add-on Manager, Add-ons, Reference, Référence
InstallListeners are notified of an AddonInstall's progress. They may be registered to hear events from all AddonInstalls through AddonManager.addInstallListener() or to a single AddonInstall through AddonInstall.addListener().
24 TypeListener
TypeListeners can be registered with AddonManager.addTypeListener() and will then receive notification as AddonType are registered and unregistered.
25 UpdateCheckListener Add-on Manager, Add-ons, Method, Reference, Référence
UpdateCheckListeners are passed the results of update checks performed by the AddonUpdateChecker.
26 UpdateInfo Add-on Manager, Add-ons, Property, Reference, Référence
UpdateInfo objects hold information about available versions of add-ons and are generated as a result of an update check performed by AddonUpdateChecker.
27 UpdateListener Add-on Manager, Add-ons, Extensions, Method, Reference, Référence
An UpdateListener receives messages from an update check for a single add-on, though it is possible to pass the same UpdateListener to as many calls to Addon.findUpdates() as you like. For each individual update check, the following methods will be called on the listener:
28 Add-on Repository AMO, Add-on Manager, Add-ons
The Add-on Repository is responsible for finding available add-ons; it provides an interface for interacting with the addons.mozilla.org (AMO) site. Its API provides URLs that can be visited to browse the repository's add-ons. The API also offers two ways to search for and retrieve an array of Addon instances: retrieveRecommendedAddons(), which returns a list of recommended add-ons, and searchAddons(), which performs a search of the repository.
29 SearchCallback Add-on Manager, Add-ons
SearchCallbacks are notified when the AddonRepository search completes. If the search succeeded, then searchSucceeded() is called and is passed an array of Addon objects that matched the search. Since these Addons are not actually installed, the AddonManager does not know about them. However, for each returned add-on, an AddonInstall object is created, which the AddonManager does know about. Each AddonInstall can be accessed through the Addon install attribute, and is initially in the STATE_AVAILABLE state. The array of Addons passed to  searchSucceeded() only includes add-ons that are compatible with the current application and are not already installed or being installed. The AddonRepository is available for another search once one of the callback functions is called.
30 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.
31 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.
32 Guides Add-on SDK
This page lists more theoretical in-depth articles about the SDK.
33 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.
34 Communicating With Other Scripts
This section of the guide explains how content scripts can communicate with:
35 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.
36 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.
37 Cross-domain Content Scripts Add-on SDK, Add-ons, Extensions, add-ons
By default, content scripts don't have any cross-domain privileges. In particular, they can't:
38 Interacting with page scripts Add-on SDK, Add-ons, Extensions, add-ons
By default, content scripts loaded by add-ons and scripts loaded by web pages are insulated from each other:
39 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:
40 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.
41 port
This article documents the port object, which is used to communicate between a content script and the main add-on code.
42 self
This article documents the self object that is available as a global in content scripts. self provides:
43 Contributor's Guide
No summary!
44 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.
45 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.
46 Getting Started Add-on SDK
Learn how to contribute to the Add-on SDK.
47 Modules Add-ons, Extensions, add-ons
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.
48 Private Properties
A private property is a property that is only accessible to member functions of instances of the same class. Unlike other languages, JavaScript does not have native support for private properties. However, 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.
49 Firefox Compatibility Add-on SDK
No summary!
50 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:
51 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.
52 Porting the Library Detector Add-on SDK, Add-ons, Example, Extensions, Sample code, Tutorial, add-ons
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.
53 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.
54 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.
55 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.
56 Testing the Add-on SDK Add-on SDK, CFX, JPM, SDK, jpm
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.
57 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:
58 Working with Events
The Add-on SDK supports event-driven programming.
59 XUL Migration Guide
This guide aims to help you migrate a XUL-based add-on to the SDK.
60 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.
61 addon-page Add-on SDK, Add-ons, Extensions, Reference, Référence, add-ons
Create a page that does not contain navigational elements.
62 base64 Add-on SDK
Data encoding and decoding using Base64 algorithms.
63 clipboard Add-on SDK
Interact with the system clipboard, setting and getting its contents.
64 context-menu Add-on SDK, Add-ons, Extensions, Firefox, SDK, add-ons
Adds items, submenus, and menu separators to the page's context menu.
65 hotkeys Add-on SDK
Assign hotkey combinations to functions in your add-on.
66 indexed-db Add-on SDK
Exposes the IndexedDB API to add-ons.
67 l10n Add-on SDK
Localize strings appearing in the add-on's JavaScript code.
68 notifications Add-on SDK, Notifications
Display transient, toaster-style desktop messages to the user.
69 page-mod Add-on SDK
Run scripts in the context of web pages whose URL matches a given pattern.
70 page-worker Add-on SDK
Create a permanent, invisible page and access its DOM.
71 panel Add-on SDK, Add-ons, Extensions, add-ons
Creates transient dialogs to implement part of an add-on's user interface.
72 passwords Add-on SDK
Interact with Firefox's Password Manager to add, retrieve and remove stored credentials.
73 private-browsing Add-on SDK
Check whether a given object is private, so an add-on can respect private browsing
74 querystring Add-on SDK
Utility functions for working with query strings.
75 request NeedsUpdate, SDK, add-on
Make simple network requests.
76 selection Add-on SDK
Get and set text and HTML selections in the current web page.
77 self Add-on SDK
Access data that is bundled with the add-on, and add-on metadata.
78 simple-prefs Add-on SDK
Store preferences across application restarts.
79 simple-storage Add-on SDK, Add-ons, Reference, Référence, add-ons
Lets an add-on store data so that it's retained across Firefox restarts.
80 system Add-on SDK
Query the add-on's environment and access arguments passed to it.
81 tabs Add-on SDK
Open, manipulate, and access tabs, and receive tab events.
82 timers Add-on SDK
Set one-off and periodic timers.
83 ui Add-on SDK, Add-ons, Extensions, Reference, add-ons
Provides access to button, toolbar, and sidebar UI objects.
84 url Add-on SDK
Construct, validate, and parse URLs.
85 widget Add-on SDK
Create a simple user interface for an add-on in Firefox's add-on bar.
86 windows Add-on SDK
Enumerate and examine open browser windows, open new windows, and listen for window events.
87 Low-Level APIs
Modules in this section implement low-level APIs. These modules fall roughly into three categories:
88 /loader
Create CommonJS module loaders.
89 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.
90 console/plain-text
Constructor for a console instance.
91 console/traceback
Functionality similar to Python's traceback module.
92 content/content
Re-exports three objects from three other modules: Loader, Worker, and Symbiont.
93 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.
94 content/mod
Provides functions to modify a page content.
95 content/symbiont
Used by SDK modules that can load web content and attach content scripts to it.
96 content/worker
Used in the internal implementation of SDK modules which use content scripts to interact with web content.
97 core/heritage
Helper functions for inheritance.
98 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.
99 core/promise
Implementation of promises to make asynchronous programming easier.
100 dev/panel
Enables you to extend the Firefox Developer Tools.
101 event/core
The event/core module allows the creation of APIs to broadcast and subscribe to events.
102 event/target
Create objects that broadcast events.
103 frame/hidden-frame
Creates Firefox frames (i.e. XUL <iframe> elements) that are not displayed to the user.
104 frame/utils
Provides helper functions for working with platform internals like frames and browsers.
105 fs/path
Provides access to the local filesystem with the NodeJS path module API.
106 io/byte-streams
Provides streams for reading and writing bytes.
107 io/file
Provides access to the local filesystem.
108 io/text-streams
Provides streams for reading and writing text.
109 lang/functional
Functional helper methods.
110 lang/type
Functions for working with type detection.
111 loader/cuddlefish Add-on SDK, CFX
The SDK's module loader.
112 loader/sandbox
Create JavaScript sandboxes and execute scripts in them.
113 net/url
Enables you to read content from a URI.
114 net/xhr
Provides access to XMLHttpRequest functionality.
115 places/bookmarks
Create, modify, and retrieve bookmarks.
116 places/favicon
Helper functions for working with favicons.
117 places/history
Access the user's browsing history.
118 platform/xpcom
Implement XPCOM objects, factories, and services.
119 preferences/event-target Add-on SDK
Listen to changes to the Preferences system in Firefox.
120 preferences/service Add-on SDK, Jetpack, SDK
Access the Preferences system in Firefox.
121 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.
122 remote/parent Reference, Référence, SDK
Enables you to load modules, and privileged parts of your add-on in general, into child processes.
123 stylesheet/style
Modify styles using stylesheet files or CSS rules.
124 stylesheet/utils
Helper functions for working with stylesheets.
125 system/child_process
An implementation of the node.js child_process API.
126 system/environment
Access, set and clear environment variables.
127 system/events
API for working with the application observer service.
128 system/runtime
Access to information about Firefox's runtime environment.
129 system/unload
Register callbacks that are called when a module is unloaded.
130 system/xul-app
Information about the application on which your add-on is running.
131 tabs/utils
Functions for working with XUL tabs and the XUL tabbrowser object.
132 test/assert Add-on SDK, JPM, jpm
Implements the assert interface defined in the CommonJS Unit Testing specification version 1.1.
133 test/harness
Test harness setup and execution.
134 test/httpd
An HTTP server for the Mozilla platform, which can be used in unit tests.
135 test/runner
Sets up unit tests.
136 test/utils
Helper methods used in the CommonJS Unit Testing suite.
137 ui/button/action
Add a button to the Firefox user interface.
138 ui/button/toggle
Add a toggle button to the Firefox user interface.
139 ui/frame
Create HTML iframes, using bundled HTML, CSS and JavaScript, that can be added to a designated area of the Firefox user interface.
140 ui/id
Create UI component IDs.
141 ui/sidebar
Enables you to create sidebars.
142 ui/toolbar
Add a toolbar to the Firefox user interface.
143 util/array
Helper functions for working with arrays.
144 util/collection
A simple list-like class and utilities for using it.
145 util/deprecate
Functions to deprecate code.
146 util/list
Building blocks for composing lists.
147 util/match-pattern
Test strings containing URLs against simple patterns.
148 util/object
Functions for working with objects.
149 util/uuid
Generate or parse UUIDs.
150 window/utils
Functions for working with browser windows.
151 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.
152 Tools Add-on SDK, CFX, JPM, jpm
Articles listed here provide a reference for the SDK's tools:
153 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.
154 cfx to jpm CFX, JPM, SDK, add-on, jpm
A guide to working with jpm if you're already familiar with cfx.
155 console Add-on SDK
Enables your add-on to log error, warning or informational messages.
156 jpm Add-on SDK, JPM, jpm
jpm is a command-line tool that enables you to test, run, and package add-ons.
157 jpm-mobile ADB, Add-ons, JPM, Mobile, Testing, add-ons, jpm, travis-ci
The Node-based replacement for cfx --force-mobile. Enables you to run and test add-ons for Firefox Mobile (aka Fennec).
158 jpmignore JPM, jpm
Use .jpmignore to ignore files from your XPI builds created via jpm.
159 package.json CommonJS, JPM, SDK, add-on, jpm, 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.
160 Tutorials Add-on SDK
This page lists practical hands-on articles about how to accomplish specific tasks using the SDK.
161 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.
162 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.
163 Adding a Button to the Toolbar Add-on SDK
To add a button to the toolbar, use the action button or toggle button modules.
164 Annotator Add-on SDK
In this tutorial we'll build an add-on that uses many of the SDK's high-level APIs.
165 Creating annotations Add-on SDK, Add-ons, Beginner, Extensions, Tutorial, add-ons
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.
166 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.
167 Implementing the widget Add-on SDK, Add-ons, Beginner, Extensions, Tutorial, add-ons
We want the widget to do two things:
168 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.
169 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:
170 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:
171 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.
172 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.
173 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.
174 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.
175 Getting Started (jpm) Add-on SDK, JPM, jpm
In this tutorial we've built and packaged an add-on using three commands:
176 Getting started (cfx)
In this tutorial we've built and packaged an add-on using three commands:
177 List Open Tabs Add-on SDK
To list the open tabs, you can iterate over the tabs object itself.
178 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:
179 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.
180 Localization Add-on SDK, Localization
The SDK supports localization of strings appearing in:
181 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.
182 Modifying Web Pages Based on URL Add-on SDK
To modify any pages that match a particular pattern (for example, "https://example.org/") as they are loaded, use page-mod module.
183 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.
184 Open a Web Page Add-on SDK
To open a new web page, you can use the tabs module:
185 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.
186 Unit Testing Add-on SDK, JPM, 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.
187 Using XPCOM without chrome Bookmarks, Chrome, SDK, XPCOM, bookmarks
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.
188 Using third-party modules (jpm) Addon-SDK, JPM, jpm
First, while in the root of your add-on, install the package that contains the modules you want to use:
189 Bootstrapped extensions Add-ons, Extensions, Firefox 4, Gecko 2.0, Guide, Localization, add-ons
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.
190 Code snippets Add-ons, Code snippets, Extensions
This is a quick list of useful code snippets (small code samples) available for developers of extensions for the various Mozilla applications. Many of these samples can also be used in XULRunner applications, as well as in actual Mozilla code itself.
191 Alerts and Notifications Code snippets
non-modal notification and further interaction with users
192 Autocomplete Code snippets, Form Fill, Satchel
First, declare a panel with the "autocomplete" type, like so:
193 Bookmarks Code snippets, Developing Mozilla, Extensions, Places
Firefox 3 provides a reworked set of API for working with History and Bookmarks. The documentation for the new API is available at Places.
194 Boxes Code snippets
Make the BOX style="display: block" and the wrapping behavior will occur when the box is resized:
195 Canvas code snippets Canvas, Code snippets, Graphics, canvas
For general information about using <canvas> see the canvas topic page.
196 Cookies Add-ons, Code snippets, Cookies, Extensions, add-ons, cookies
Cookies for a given host, represented as objects, can be enumerated as such:
197 Customizing the download progress bar
This example illustrates how to customize the progress bar displayed for a given download in the Downloads window.
198 Delayed Execution Code snippets
When a task needs to be only briefly delayed, such that it runs after the current call chain returns, it can be added directly to the main thread's event queue rather than scheduled as a timeout:
199 Dialogs and Prompts Add-ons, Code snippets, Extensions, XUL
This page has some code snippets used to display and process dialog boxes. See Working with windows in chrome code for introductory information and more discussion and examples.
200 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.
201 Drag & Drop Code snippets
It's possible to setup drag and drop event s to handle dropping files from external applications or OS file managers onto your XUL-based application. First, you need to hook up the basic drag event handlers:
202 Embedding SVG Code snippets
SVG is an XML based makeup language and can be embedded into other markup languages, like XHTML and XUL.
203 Examples and demos from articles
What follows is a brief list of examples and demos from our theoretical articles.
204 File I/O Add-ons, Code snippets, Extensions, Files, Streams, Tutorial, add-ons
This article describes local file input/output in chrome JavaScript.
205 Finding window handles Add-ons, Code snippets, Extensions, XPCOM, js-ctypes
When working on Windows platforms, many APIs and frameworks require a window handle (HWND type). Since Mozilla tries to be as cross-platform as possible, it can be difficult to get the handle you need.
206 Forms related code snippets Code snippets, Forms
Here are some <form> related code snippets.
207 HTML in XUL for rich tooltips Code snippets, Examples, HTML, XUL
This example demonstrates the dynamic injection of HTML into a XUL element. Specifically, we create a rich tooltip that uses HTML instead of plain text.
208 HTML to DOM Code snippets, DOM, Guide, HTML, Intermediate, NeedsUpdate
Although you can now natively parse HTML using DOMParser and XMLHttpRequest, this is a new feature that is not yet supported by all browsers in use in the wild. The code snippets on this page will let your site work until these new features are more widely available.
209 IsDefaultNamespace
The following is a snippet to get isDefaultNamespace() supported across other browsers.
210 JS XPCOM Code snippets, JavaScript, XPCOM, about:, nsIAboutModule
Here are a few useful snippets of code for dealing with XPCOM components in JavaScript.
211 JavaScript Debugger Service Code snippets
In Firefox versions prior to Gecko 33 (Firefox 33 / Thunderbird 33 / SeaMonkey 2.30), the JavaScript Debugger Service (or simply JSD) used to be an XPCOM component that allows the tracking of JavaScript while it was being executed in the browser. However, JSD has been removed in favor of the Debugger API. See the tracking bug bug 800200 for more details.
212 JavaScript timers JavaScript timers, NeedsBetterPlace
A block of JavaScript code is generally executed synchronously. But there are some JavaScript native functions (timers) which allow us to delay the execution of arbitrary instructions:
213 Javascript Daemons Management DOM, Guide, JavaScript, JavaScript timers, MakeBrowserAgnostic
In computer science a daemon is a task that runs as a background process, rather than being under the direct control of an interactive user. In the JavaScript programming language, daemons are all processes created by JavaScript timers or by a Worker instantiation. Here are some code snippets that simplify and abstract the management of daemons.
214 Label and description Code snippets
No summary!
215 LookupNamespaceURI
Here is an implementation of Node.lookupNamespaceURI which should work cross-browser.
216 LookupPrefix
Here is an implementation of lookupPrefix which should work cross-browser.
217 Miscellaneous Add-ons, Code, Code snippets, Extensions, Snippets
This page contains small, self-explanatory code snippets.
218 Modules
Some simple code to turn a JavaScript module into non-Mozilla-specific code (e.g., if porting to the browser). The use of eval() will probably not be of concern because it is only being used on the EXPORTED_SYMBOLS array which should not depend on user input.
219 On page load Add-ons, Extensions
This article is for XUL/JavaScript developers who want to have custom code executed each time a new page is loaded in browser/mail. If you need finer control over custom code execution—for example, as documents are loading or when tabs are switched—see Progress Listeners.
220 Page Loading Code snippets
No summary!
221 Post data to window Add-ons, Extensions, NeedsContent
This offers examples of sending POST data to the server and displaying the server response.
222 Preferences Add-ons, Code snippets, Extensions, Guide, Mozilla, Preferences
This article provides examples for extension developers that wish to use the Mozilla preferences system. Information here applies to the Mozilla Suite, Firefox, Thunderbird, and possibly other Mozilla-based applications. For more details on preferences in Mozilla, see Preferences System.
223 Progress Listeners Add-ons, Extensions
Progress listeners allow extensions to be notified of events associated with documents loading in the browser and with tab switching events. Progress listeners implement the nsIWebProgressListener interface.
224 QuerySelector DOM
No summary!
225 Rosetta C, DOM, HTML, HTMLScriptElement, JavaScript, Non-JavaScript, Programming Languages
By default, the only possible standardized scripting language for HTML is ECMAScript. Hence, if you are going to use another scripting language you might expect that most of the browsers will not recognize it. Also, regarding some languages (like C), it is even not well defined the meaning of part of their semantics in respect to a scope that is more restricted than the full access to the resources they usually deal with – imagine, for example, the meaning of a C pointer within a HTML page! Nevertheless, the increasing computational power of modern browsers together with the introduction of typed arrays in ECMAScript allow us, in theory, to build full virtual machines in pure ECMAScript. Therefore, it is also possible, in theory, to use ECMAScript for a smaller task: parsing exotic programming languages (i.e., creating compilers).
226 Running applications Add-ons, Code snippets, Extensions
This page describes how to run other programs from your chrome JavaScript code, using Mozilla XPCOM interfaces. There are two ways to run programs.
227 SVG Animation NeedsContent
This article needs to be written!
228 SVG General Code snippets
On this page you will find some simple, general information on SVG markup. Hopefully, enough to get you creating some SVG images. You will also find some general purpose scripting helpers, that should make scripting SVG a little easier.
229 Scrollbar Code snippets
This example shows how to style the scrollbars in your xul application. Scrollbars inside browser elements will be styled to. Tested on windows xp.
230 Sidebar Add-ons, Code snippets, Extensions, add-ons
This page provides several snippets demonstrating how to work with the Firefox sidebar.
231 StringView Code snippet, Guide, JavaScript, JavaScript typed arrays, MDN JavaScript Libraries, Sample code, Typed Arrays, WebGL, WebSockets, js-ctypes
As web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using WebSockets, and so forth, it has become clear that there are times when it would be helpful for JavaScript code to be able to quickly and easily manipulate raw binary data. In the past, this had to be simulated by treating the raw data as a string and using the charCodeAt() method to read the bytes from the data buffer.
232 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:
233 Toolbar Add-ons, Code snippets, Extensions, Toolbars
There are two tutorials available:
234 Tree Code snippets
To expand all tree nodes:
235 URI parsing
When dealing with the facilities of nsIURI, the task of parsing a URI can still require additional work.
236 View Source for XUL Applications
XUL applications wanting to show the source code for documents should import the viewSourceUtils.js script instead of attempting to open the viewSource.xul window themselves:
237 Windows Add-ons, Code snippets, Extensions, Guide, NeedsContent, NeedsHelp, add-ons
This article offers code snippets demonstrating common tasks you may wish to perform.
238 XML-related code snippets Add-ons, Code snippets, Extensions
No summary!
239 xml:base support in old browsers Code snippets
These two functions aim to allow some support for xml:base.
240 XPath
(The following was moved from document.evaluate)
241 getAttributeNS Code snippets
As some browsers do not support getAttributeNS, the following might be used to work on them as well. While namespaced attributes are less common than namespaced elements, some standards such as XLink depend on them.
242 Comparing Extension Techniques
There are three common methods of developing extensions: the Add-on SDK, manually bootstrapped restartless extensions, and legacy, overlay-based restartful extensions.
243 Creating OpenSearch plugins for Firefox Add-ons, Guide, OpenSearch, Search, Search plugins, add-ons, search
Firefox supports the OpenSearch description format for search plugins. Plugins that use OpenSearch are compatible with Firefox, Internet Explorer, and Chrome. Because of this, they are the recommended format for use on the web.
244 Creating custom Firefox extensions with the Mozilla build system Add-ons, Build documentation, Developing Mozilla, Extensions, Guide, NeedsContent, XPCOM, add-ons
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:
245 Extension Etiquette Add-ons, Extensions, Guide, add-ons
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.
246 Extension Packaging Add-ons, Extensions, Guide, Toolkit API, add-ons
There are four different techniques you can use to build extensions: WebExtension based extensions, Add-on SDK-based extensions, Bootstrapped (restartless) extensions, and Overlay extensions. Of these four techniques, two are considered current and should be used for developing new extensions:
247 Extensions for Firefox for Android
Firefox for Android supports add-ons using the same extension system used by all other Gecko-based applications. You can use the Add-on SDK or build manually bootstrapped restartless add-ons. You can even develop traditional restart-required add-ons, although the other two approaches are preferable.
248 API
There are a couple of differences between desktop Firefox and Firefox for Android that are particularly relevant to add-on developers:
249 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.
250 BrowserApp Apps, CodingScripting, Firefox, Glossary, Guide, Mobile, add-on, glossary
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.
251 addTab
BrowserApp.addTab() opens a new tab. By default, the new tab is made the selected tab.
252 closeTab
BrowserApp.closeTab(tab) closes the supplied tab. If no other tabs are open, then the tab is not closed.
253 deck
deck is a property of the BrowserApp object. It is a deck of all currently open browsers, represented as browser objects.
254 getBrowserForDocument
BrowserApp.getBrowserForDocument() retrieves a browser, given the DOM document hosted by that browser.
255 getBrowserForWindow
BrowserApp.getBrowserForWindow() retrieves a browser, given the DOM content window hosted by that browser.
256 getTabForBrowser
BrowserApp.getTabForBrowser() retrieves a tab, given the XUL browser object hosted by that tab.
257 getTabForId
BrowserApp.getTabForId() retrieves a browser tab, given its unique ID.
258 getTabForWindow
BrowserApp.getTabForWindow() retrieves a browser tab, given the DOM window hosted by that tab.
259 loadURI
BrowserApp.loadURI(uri, browser, params) loads the specified URI into the specified browser.
260 quit Apps, Firefox, Mobile, NeedsContent
BrowserApp.quit() closes the browser.
261 selectTab Mobile, NeedsContent, Reference, Référence
BrowserApp.selectTab(tab) makes the supplied tab the currently selected tab.
262 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.
263 HelperApps.jsm
264 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:
265 banner API, Glossary, Guide, JavaScript, glossary
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.
266 panels API, CodingScripting, Firefox, Glossary, Guide, JavaScript, Mobile, add-on, glossary
Use the Home.panels API to add custom panels to the browser's home page.
267 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.
268 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.
269 JavaAddonManager.jsm
The JavaAddonManager API lets you dynamically load compiled Java code and interact with it.  JavaAddonManager is a single object that provides a Promise-based API.  JavaAddonManager is a factory that produces JavaAddonV1 instances.
270 NativeWindow
The NativeWindow object enables Firefox for Android add-ons to create user interface components.
271 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().
272 add API, Api, CodingScripting, Firefox, Guide, JavaScript, Mobile, add-on, guide
NativeWindow.contextmenus.add() adds a new context menu item to Firefox for Android.
273 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.
274 doorhanger Add-ons, Extensions, Mobile, Reference, Référence, add-ons
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.
275 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().
276 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.
277 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.
278 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.
279 toast Add-ons, CodingScripting, Firefox, Guide, JavaScript, Mobile, add-ons
Returns a reference to the NativeWindow.toast object, which can be used to display toast notifications on Firefox for Android.
280 show API, Add-ons, CodingScripting, Firefox, Glossary, Guide, JavaScript, Mobile, add-ons, glossary, toast
NativeWindow.toast.show() displays a toast notification on Firefox for Android.
281 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.
282 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:
283 Prompt.jsm
284 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.
285 Snackbars.jsm
Contains the Snackbars object, which can be used to show notifications to let users know that some change has been made.
286 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.
287 Tab API, Add-ons, CodingScripting, Firefox, Mobile, Tab, add-ons
The Tab object represents a browser tab, and provides access to the browser and the DOM content window hosted by that tab.
288 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.
289 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.
290 Creating a User Interface
See the NativeWindow documentation for examples the APIs Firefox for Android add-ons can use to create user interface components.
291 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.
292 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.
293 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.
294 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.
295 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.
296 Hotfix Extension
This document has been moved to the Add-ons wiki.
297 How to convert an overlay extension to restartless Add-ons, Code snippets, Extensions, Firefox, Firefox OS, Guide, Preferences system, add-ons
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.
298 Index Add-ons, Glossary, Guide, Index, add-ons, glossary, index
Found 887 pages:
299 Inline options Add-ons, Extensions, XUL, add-ons
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.
300 Install Manifests Add-ons, Extensions, Manifests, NeedsUpdate, Toolkit API, add-ons
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.
301 Installing extensions Add-ons, Extensions, Guide, add-ons, guide
If you're putting together an installer that needs to be able to install extensions for a toolkit-based application, such as Firefox or anything using XULRunner, Gecko 1.9 (Firefox 3) introduces an easy way to do this for Windows, OS X and Linux. Windows users have also had the ability to install extensions using the registry for some time. Now, on OS X and Linux, you can simply copy the extension into a predefined directory on the user's computer.
302 Interfacing with the Add-on Repository AMO, Add-on Manager, Add-ons, 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.
303 Legacy extensions Add-ons, Extensions, Landing, add-ons
This page contains links to documentation for the approach to developing extensions for Gecko-based applications which uses:
304 Firefox addons developer guide Add-ons, Extensions, Firefox, Guide, add-ons
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.
305 Appendix: What you should know about open-source software licenses
No summary!
306 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.)
307 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).
308 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.
309 Chapter 4: Using XPCOM—Implementing advanced processes
This chapter explains how to use XPCOM to implement advanced processes using only JavaScript.
310 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.
311 Chapter 6: Firefox extensions and XUL applications
This chapter discusses tools to assist in developing extensions.
312 License and authors
License: Attribution-Share Alike 2.1 Japan.
313 XUL School Tutorial Add-ons, Extensions, References, Tutorials, XUL, add-ons
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.
314 Adding Events and Commands Add-ons, CodingScripting, DOM, Events, Glossary, Guide, JavaScript, XUL, add-ons, events, glossary
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:
315 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.
316 Adding menus and submenus Add-ons, CodingScripting, Macs, XUL, add-ons, 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.
317 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.
318 Adding windows and dialogs
To open a new window, use the Javascript window.open function just like with HTML windows.
319 Appendix A: Add-on Performance Add-ons, Extensions, Performance, add-ons, 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.
320 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.
321 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.
322 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.
323 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.
324 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.
325 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.
326 Custom XUL Elements with XBL
Taken from the XBL page.
327 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.
328 Handling Preferences Add-ons, Extensions, XUL, XUL School, add-ons
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:
329 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.
330 Introduction
Welcome to the XUL School Tutorial!
331 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.
332 Local Storage Guide, Storage, XUL, storage
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.
333 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.
334 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.
335 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.
336 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.
337 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.
338 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 .
339 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.
340 XPCOM Objects
Taken from the XPCOM page.
341 Performance best practices in extensions Add-ons, Best practices, Extensions, Guide, NeedsContent, NeedsExample, Performance, add-ons
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.
342 Plugins Add-ons, NPAPI, Plugins, add-ons
Plugins are shared libraries that users can install to display content that the browser can't display natively. For example, the Adobe Reader plugin lets the user open PDF files directly inside the browser, and the QuickTime and RealPlayer plugins are used to play special format videos in a web page.
343 Adobe Flash Guide, Plugins
This article explains how JavaScript can be used to access methods from within the Flash plugin, as well as how a feature called FSCommands can be used to access JavaScript functions from within the Flash animation. The focus of this article is to present tips on scripting Flash within Gecko™-based web browsers.
344 External resources for plugin creation Plugins
There are several open source projects designed to assist with the creation of NPAPI plugins.  Please note that even when using these, it is still a good idea to have an understanding of what is going on under the hood, regardless of the level of abstraction provided.
345 Logging Multi-Process Plugins
When multi-process plugins are enabled, Firefox has the ability to dump additional information about interactions between the browser and a plugin. This is done using NSPR logging. Run Firefox in a custom environment to enable this special logging mode.
346 Monitoring plugins Add-ons, Firefox 3, Plugins
A new component of the plugin system is now available to measure how long it takes plugins (e.g., Adobe Flash) to execute their calls. This component then reports the plugin runtime using the observer service to anyone registered to receive the notifications. This article discusses how developers can make use of this new feature.
347 Multi-process plugin architecture Add-ons, Electrolysis, IPC, IPDL, Plugins
Plugins are a frequent source of instability or crashes for browser users. When plugins run in the same process as the browser, any leaks or crashes in the plugin will affect the entire browser:
348 NPAPI plugin developer guide Add-ons, Advanced, Guide, Landing, Plug-ins
Plugins are shared libraries that users can install to display content that the application itself can't display natively. For example, the Adobe Flash plug-in is used to access Flash content (including videos and certain interactive applications), and the QuickTime and RealPlayer plugins are used to play special format videos in a web page.
349 NPAPI plugin reference Deprecated, Landing, NPAPI, Plugins, Reference, Référence
The articles below describe each of the APIs related to NPAPI plugins.
350 Browser-side plug-in API Landing, Method, NPAPI, Plugins, Reference, Référence
This chapter describes methods in the plug-in API that are provided by the browser; these allow call back to the browser to request information, tell the browser to repaint part of the window, and so forth. The names of all of these methods begin with NPN_ to indicate that they are implemented by the browser and called by the plug-in.
351 NPAPI plug-in side API Add-ons, Deprecated, Landing, NPAPI, Plugins, Reference, Référence
This chapter describes methods in the plug-in API that are available from the plug-in object; these allow plug-ins to interact with the browser. The names of all of these methods begin with NPP_ to indicate that they are implemented by the plug-in and called by the browser.
352 NPAnyCallbackStruct API, Gecko, NPAPI, Plugins, Reference
Contains information required during embedded mode printing.
353 NPByteRange NPAPI, Plugins
Represents a particular range of bytes from a stream.
354 NPClass NPAPI, Plugins
NPClass is a structure that holds a set of pointers to functions that make up the behavior of an instance of an NPClass (i.e. an NPObject).
355 NPEmbedPrint NPAPI, Plugins
Substructure of NPPrint that contains platform-specific information used during embedded mode printing.
356 NPEvent NPAPI, Plugins
Represents an event passed by NPP_HandleEvent() to a windowless plug-in.
357 NPFullPrint NPAPI, Plugins
Substructure of NPPrint that contains platform-specific information used during full-page mode printing.
358 NPIdentifier NPAPI, Plugins
NPIdentifier is an opaque type used for method and property identifiers, such as strings or integers. NPIdentifiers are unique, in that for any given string or integer, there is only one NPIdentifier. The lifetime of NPIdentifiers is controlled by the browser.
359 NPN NewStream NPAPI, Plugins
Requests the creation of a new data stream produced by the plug-in and consumed by the browser.
360 NPNVariable
See NPN_GetValue.
361 NPN_CreateObject NPAPI, Plugins
Allocates a new NPObject.
362 NPN_DestroyStream API, Gecko, NPAPI, Plugins, Reference
Closes and deletes a stream.
363 NPN_Enumerate
Gets the names of the properties and methods of the specified NPObject.
364 NPN_Evaluate NPAPI, Plugins
Evaluates a script in the scope of the specified NPObject.
365 NPN_ForceRedraw NPAPI, Plugins
Asks the plugin host to immediately (synchronously) repaint invalid areas.
366 NPN_GetAuthenticationInfo
The function is called by plugins to get HTTP authentication information from the browser.
367 NPN_GetIntIdentifier NPAPI, Plugins
Returns an opaque identifier for the integer that is passed in.
368 NPN_GetProperty NPAPI, Plugins
Gets the value of a property on the specified NPObject.
369 NPN_GetStringIdentifier NPAPI, Plugins
Returns an opaque identifier for the string that is passed in.
370 NPN_GetStringIdentifiers NPAPI, Plugins
Returns an array of opaque identifiers for the names that are passed in.
371 NPN_GetURL API, Gecko, NPAPI, Plugins, Reference
Asks the browser to create a stream for the specified URL.
372 NPN_GetURLNotify NPAPI, Plugins
Requests creation of a new stream with the contents of the specified URL; gets notification of the result.
373 NPN_GetValue NPAPI, NeedsHelp, Plugins, Reference, Référence
Allows the plug-in to query the browser for information.
374 NPN_GetValueForURL
Provides information to a plugin which is associated with a given URL, for example the cookies or preferred proxy.
375 NPN_HasMethod NPAPI, Plugins
Determines whether or not the specified NPObject has a particular method.
376 NPN_HasProperty NPAPI, Plugins
Determines whether or not the specified NPObject has a particular property.
377 NPN_IdentifierIsString NPAPI, Plugins
Determines whether or not an identifier is a string.
378 NPN_IntFromIdentifier NPAPI, Plugins
Returns the integer value corresponding to the given integer identifier.
379 NPN_InvalidateRect NPAPI, Plugins
Invalidates the specified portion of the plugin's drawing area, adding it to the region that needs to be redrawn when the plugin next repaints its contents.
380 NPN_InvalidateRegion NPAPI, Plugins
Invalidates the specified drawing region prior to repainting or refreshing a windowless plug-in.
381 NPN_Invoke NPAPI, Plugins
Invokes a method on the given NPObject.
382 NPN_InvokeDefault NPAPI, Plugins
Invokes the default method, if one exists, on the given NPObject.
383 NPN_MemAlloc NPAPI, NeedsMigrationReview, Plugins
Allocates memory from the browser's memory space.
384 NPN_MemFlush API, Gecko, NPAPI, Plugins, Reference
Requests that the browser free a specified amount of memory.
385 NPN_MemFree NPAPI, NeedsMigrationReview, Plugins
Deallocates a block of allocated memory.
386 NPN_PluginThreadAsyncCall NPAPI, Plugins
Thread safe way to request that the browser calls a plug-in function on the browser or plugin thread (the thread on which the plug-in was initiated).
387 NPN_PostURL NPAPI, NeedsHelp, Plugins, Reference
Posts data to a URL.
388 NPN_PostURLNotify NPAPI, NeedsHelp, Plugins, Reference
Posts data to a URL, and receives notification of the result.
389 NPN_ReleaseObject NPAPI, Plugins
Decrements the reference count of the given NPObject. If the reference count reaches 0, the NPObject is deallocated by calling its deallocate function if one is provided; if one is not provided, free() is used.
390 NPN_ReleaseVariantValue NPAPI, Plugins
NPN_ReleaseVariantValue() releases the value in the given variant.
391 NPN_ReloadPlugins API, Gecko, NPAPI, Plugins, Reference
Reloads all of the installed plugins.
392 NPN_RemoveProperty NPAPI, Plugins
Removes a property from the specified NPObject.
393 NPN_RequestRead API, Gecko, NPAPI, Plugins, Reference
Requests a range of bytes from a seekable stream. This initiates a read operation; the actual data is received through subsequent calls to NPP_WriteReady() and NPP_Write().
394 NPN_RetainObject NPAPI, Plugins
Increments the reference count of the given NPObject.
395 NPN_SetException NPAPI, Plugins
A plugin can call this function to indicate that a call to one of the plugin's NPObjects generated an error.
396 NPN_SetProperty NPAPI, Plugins
Sets the value of a property on the specified NPObject.
397 NPN_SetValue NPAPI, NeedsHelp, Plugins, Reference
Implemented by browsers. This call is used to inform the browser of variable information controlled by the plugin.
398 NPN_SetValueForURL
Allows a plugin to change the stored information associated with a URL, in particular its cookies. (While the API theoretically allows the preferred proxy for a given URL to be changed, doing so does not have much meaning given how proxies are configured, and is not supported.)
399 NPN_Status API, Gecko, NPAPI, Plugins, Reference
Lets a plug-in display a message on the browser's status line.
400 NPN_UTF8FromIdentifier NPAPI, Plugins
Returns the UTF-8 string corresponding to the given string identifier.
401 NPN_UserAgent API, Gecko, NPAPI, Plugins, Reference
Returns the browser's user agent field. This can be used to handle variations in different browsers (or versions thereof) when implementing your plug-in.
402 NPN_Version API, Gecko, NPAPI, Plugins, Reference
Lets plugins obtain version information, both of the plug-in API and of the browser itself.
403 NPN_Write API, Gecko, NPAPI, Plugins, Reference
Pushes data into a stream produced by the plug-in and consumed by the browser.
404 NPObject NPAPI, Plugins
NPObject is a structure that holds a pointer to an NPClass and an integer reference count, and possibly also implementation specific (i.e. plugin specific, or browser specific) members.
405 NPP API, NPAPI, Plugins, Reference
Represents a single instance of a plug-in. You specify one of these to any NPAPI function that needs to know which plug-in to work with.
406 NPPVariable
See NPN_SetValue.
407 NPP_Destroy NPAPI, Plugins
Deletes a specific instance of a plug-in.
408 NPP_DestroyStream NPAPI, Plugins
Tells the plug-in that a stream is about to be closed or destroyed.
409 NPP_GetValue NPAPI, Plugins
Allows the browser to query the plug-in for information.
410 NPP_HandleEvent NPAPI, Plugins
Delivers a platform-specific window event to the instance.
411 NPP_New NPAPI, Plugins
Creates a new instance of a plug-in.
412 NPP_NewStream NPAPI, Plugins
Notifies a plug-in instance of a new data stream.
413 NPP_Print NPAPI, Plugins
Requests a platform-specific print operation for an embedded or full-screen plug-in.
414 NPP_SetValue NPAPI, Plugins
Implemented by plugins. This call is used to inform plugins of variable information controlled by the browser.
415 NPP_SetWindow NPAPI, Plugins
Tells the plug-in when a window is created, moved, sized, or destroyed.
416 NPP_StreamAsFile NPAPI, Plugins
Provides a local file name for the data from a stream.
417 NPP_URLNotify NPAPI, Plugins
Notifies the plug-in instance of the completion of a URL request.
418 NPP_Write NPAPI, Plugins
Delivers data to a plug-in instance. (Remark: Hence the name "NPP_Write" is misleading - just think of:"Data_Arrived")
419 NPP_WriteReady NPAPI, Plugins
Determines maximum number of bytes that the plug-in can consume.
420 NPPrint NPAPI, Plugins
Contains information the plug-in needs to print itself in full-page or embedded mode.
421 NPPrintCallbackStruct NPAPI, Plugins
Contains information required by the platformPrint field of the NPEmbedPrint structure during embedded mode printing on Unix systems.
422 NPRect NPAPI, Plugins
Represents a rectangular area of a plug-in's content area.
423 NPRegion API, Gecko, NPAPI, Plugins, Reference
Represents a platform-defined region of a page.
424 NPSavedData NPAPI, Plugins
Block of instance information saved after the plug-in instance is deleted; can be returned to the plug-in to restore the data in future instances of the plug-in.
425 NPSetWindowCallbackStruct API, Gecko, NPAPI, Plugins, Reference, Référence
Contains information about the plug-in's Unix window environment.
426 NPStream NPAPI, Plugins
Represents a stream of data either produced by the browser and consumed by the plug-in, or produced by the plug-in and consumed by the browser.
427 NPString NPAPI, Plugins
NPString is a struct that holds a pointer to a sequence of 8-bit units (NPUTF8) making up a UTF-8 string, and the number of 8-bit units in the UTF-8 string.
428 NPUTF8 NPAPI, Plugins
NPUTF8 is a byte representing an 8-bit unit of a UTF-8 character. This is not the same thing as an entire UTF-8 character, which may be comprised of multiple NPUTF8 bytes.
429 NPVariant NPAPI, Plugins
NPVariant is a struct that holds a value and the type of that value. The value is held in a union, and the type is one of types defined in the NPVariantType enumeration.
430 NPVariantType NPAPI, Plugins
NPVariantType is an enumeration that is used to identify the data type of an NPVariant structure.
431 NPWindow NPAPI, Plugins
Contains information about the target into which the plug-in instance can draw.
432 NP_GetMIMEDescription Add-ons, NPAPI, Plugins
NP_GetMIMEDescription returns a supported MIME Type list for your plugin. It works on Unix (Linux) and MacOS. On Windows you have to define supported mimetypes in the dll resource file.
433 NP_GetValue NPAPI, Plugins
Allows the browser to query the plug-in for information.
434 NP_Initialize NPAPI, Plugins
Provides global initialization for a plug-in.
435 NP_Port NPAPI, Plugins
Contains information required by the window field of an NPWindow structure.
436 NP_Shutdown NPAPI, Plugins
Provides global deinitialization for a plug-in.
437 Samples and Test Cases Add-ons, NeedsContent, Plugins
Collections of NPAPI plugin samples can be found in the Seamonkey source code at /modules/plugin/sdk/samples.
438 Shipping a plugin as a Toolkit bundle Add-ons, Guide, Plugins
One of the new features that is available in Firefox 1.5 is the ability to place browser plugins in a Toolkit bundle.
439 Site Author Guide for Click-To-Activate Plugins Guide, Plugins, guide
To detect if a plugin is actually installed, query navigator.mimeTypes for the plugin MIME type you intend to use. This allows you to differentiate between plugins that are not installed and those that are click-to-activate. Do not iterate through navigator.mimeTypes or navigator.plugins: enumeration may be removed as a privacy measure in a future version of Firefox.
440 Supporting private browsing in plugins
Firefox 3.5 introduced private browsing, a mode in which potentially private information is not recorded in any way.  It also introduced a mechanism by which plugins can determine whether or not private browsing mode is in effect.  Plugins should be updated to monitor the state of private browsing mode and only save private information when private browsing is disabled.
441 The First Install Problem Add-ons, Plugins
The First Install Problem is the name given to the conditions arising when a plugin or embeddable software installs itself on a system first, before any other Gecko-based browser. If this happens, Gecko-based browsers often won't be able to discover the plugin, and will prompt the user to download the plugin again if the affiliated MIME type is encountered on the Web. Unless Gecko does a pre-emptive scan upon startup for desirable plugins that are not in the browser's plugins directory first, the best way to solve this problem is to encourage plugin vendors to leave DLLs (and XPT files, if applicable) in a location that Gecko can discover at runtime. This document presents a consistent way to do that.
442 Writing a plugin for Mac OS X Add-ons, Gecko, NPAPI, Plugins
This article is adapted from Josh Aas's blog post Writing an NPAPI plugin for Mac OS X.
443 XEmbed Extension for Mozilla Plugins Add-ons, Plugins
Recent versions of Mozilla include an extension for writing plugins that use XEmbed instead of using the old Xt-based mainloop that most plugins have been using since the Netscape 3.x days.
444 Security best practices in extensions Add-ons, Best practices, Extensions, Guide, Security, add-ons
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.
445 Setting up an extension development environment Add-ons, Extensions, Guide, add-ons, guide
This article gives suggestions on how to set up your Mozilla application for extension development. Unless otherwise specified, these suggestions apply to both Firefox and Thunderbird as well as SeaMonkey version 2.0 and above.
446 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.
447 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.
448 Techniques
.
449 Promises Add-ons, Examples, Snippets, add-ons, 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.
450 Themes Add-ons, Look & Feel, Themes, add-ons
Themes are skins for different Mozilla applications. They allow you to change the look and feel of the user interface and personalize it to your tastes. A theme can simply change the colors of the UI or it can change every piece of its appearance.
451 Common Firefox theme issues and solutions Add-ons, Firefox, Look & Feel, Themes, add-ons
The purpose of this page is to provide provide theme developers with notes on how to fix common issues.  It is a companion document to the AMO editors guide Common Theme Problems, which provides editors with "boilerplate" copy and paste review notes for common theme issues. This document was started on July 27, 2012 so it will take some time to completely fill in and some issues still need to have solutions written for them.
452 Create Your Own Firefox Background Theme
No summary!
453 Lightweight themes Add-ons, Firefox 3.6, Lightweight themes, Personas, Themes, add-ons
No summary!
454 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.
455 Obsolete
This page collects theme docs 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.
456 Creating a Skin for Firefox Add-ons, Themes, add-ons
In order to create a skin for Firefox, there are three things you need to know: how to edit images, how to extract zip files, and how to modify CSS. Firefox uses standard GIF, PNG, and JPEG images for the buttons and CSS to style everything else in the interface.
457 UUID Add-ons, Themes, add-ons
A UUID can be obtained by visiting https://www.famkruithof.net/uuid/uuidgen or by typing "firebot: uuid?" on irc.mozilla.org in a channel where nickname "firebot" is present. Or you can also type "/query firebot uuid?" in any tab connected to the irc.mozilla.org (or, with ChatZilla, "moznet") network.
458 contents.rdf Add-ons, Themes, add-ons
Copy the following text and paste it into a text file, then save that file as "contents.rdf":
459 install.rdf Add-ons, Themes, add-ons
Copy the following text and paste it into a text file, then save that file as "install.rdf":
460 Theme changes in Firefox 2 Add-ons, Themes, add-ons
This article covers the changes that need to be made to update a Firefox theme to work properly in Firefox 2.
461 Theme changes in Firefox 3 Add-ons, NeedsUpdate, Themes, add-ons
This article covers the changes that need to be made to update a Firefox theme to work properly in Firefox 3.
462 Theme changes in Firefox 3.5
No summary!
463 Theme changes in Firefox 4 Firefox 4, Themes
This article covers changes in Firefox 4 that affect theme developers.
464 Thunderbird extensions Add-ons, Extensions, add-ons, thunderbird
Categories
465 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.
466 Adding views to the Folder Pane
This is a stub page for a tutorial for Thunderbird 3.
467 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.
468 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.
469 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:
470 Building a Thunderbird extension 3: install manifest Extensions, thunderbird
The install.rdf file is an XML file that provides general information about the extension.
471 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:
472 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.
473 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:
474 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 7 you will learn how to package an .xpi file for distribution and installation.)
475 Building a Thunderbird extension 8: packaging Extensions, thunderbird
When you are satisfied with how your extension works, package it for deployment and installation.
476 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.
477 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.
478 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.
479 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.
480 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.)
481 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:
482 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.
483 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!)
484 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.
485 Common Thunderbird Extension Techniques thunderbird
No summary!
486 Access StringBundle from Overlay thunderbird
No summary!
487 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.
488 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.
489 Access Window Area NeedsUpdate, missing, thunderbird
This page has no content. Enrich MDC by contributing.
490 Add New Tab missing, thunderbird
No summary!
491 Add Option to Context Menu incomplete, thunderbird
Assuming this on chrome.manifest:
492 Add Tab NeedsUpdate, missing, thunderbird
This page has no content. Enrich MDC by contributing.
493 Add Toolbar Button
Example XUL overlay file:
494 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.
495 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:
496 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 :
497 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.)
498 Modify Folder Pane Display missing, thunderbird
See https://addons.mozilla.org/en-US/thu...er-categories/ for an example.
499 Modify Message List NeedsContent, NeedsUpdate, missing, thunderbird
This page has no content. Enrich MDC by contributing.
500 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.
501 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.
502 Thunderbird developer reference docs
No summary!
503 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.
504 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.
505 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
506 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.
507 WebExtensions
WebExtensions are a cross-browser system for developing browser add-ons. 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.
508 Add a button to the toolbar
Toolbar buttons are one of the main UI components available to WebExtensions. Toolbar buttons live in the main browser toolbar and contain an icon. When the user clicks the icon, one of two things can happen:
509 Add-on ID
WebExtensions have an ID, which is used in the browser to distinguish between this add-on and other add-ons installed in the browser, and to enable addons.mozilla.org to understand when a submission is an update to an existing add-on, rather than a new add-on.
510 Anatomy of a WebExtension needsTags
A WebExtension 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 a WebExtension.
511 Browser support for JavaScript APIs
No summary!
512 Chrome incompatibilities
WebExtensions 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.
513 Comparison with XUL/XPCOM extensions
At a very basic level, XUL/XPCOM extensions are similar to WebExtensions. They both include:
514 Comparison with the Add-on SDK
The basic structure and concepts of the Add-on SDK are shared by WebExtensions. Both technologies include:
515 Content Security Policy
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().
516 Content scripts
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).
517 Debugging
This article explains how you can use the Firefox developer tools to debug WebExtensions.
518 Debugging (before Firefox 50)
This article explains how you can use the built-in Firefox developer tools to debug WebExtensions. If you're trying to debug an add-on developed with the Add-on SDK, please see the guide to the Add-on Debugger.
519 Embedded WebExtensions
Starting in Firefox 51, you can embed a WebExtension in a legacy add-on type.
520 Example WebExtensions
To help illustrate how to develop WebExtensions, we maintain a repository of simple example WebExtensions at https://github.com/mdn/webextensions-examples. This article describes the extensions in that repository.
521 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 WebExtension development process, making development faster and easier. This article explains how to install and use web-ext.
522 Implement a settings page
A settings page gives users a way to see and change settings (sometimes also called "preferences" or "options") for the add-on.
523 Interact with the clipboard
WebExtensions can interact with the system clipboard using document.execCommand():
524 Intercept HTTP requests Add-ons, Extensions, How-to, WebExtensions, add-ons
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:
525 Internationalization Article, Guide, Internationalization, Localization, WebExtensions, guide, i18n, messages.json, placeholders, predefined messages
The WebExtensions API has a rather handy module available for internationalizing add-ons — i18n. In this article we'll explore its features and provide a practical example of how it works. The WebExtensions i18n system is similar to common JavaScript libraries for i18n such as i18n.js.
526 JavaScript APIs
No summary!
527 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.
528 alarms.Alarm API, Add-ons, Extensions, Non-Standard, Non-standard, Reference, Type, WebExtensions, add-ons, 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.
529 alarms.clear() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, alarms, clear
Cancels an alarm, given its name.
530 alarms.clearAll() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, alarms, clearAll
Cancels all active alarms.
531 alarms.create() API, Add-ons, Create, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, alarms, create
Creates a new alarm.
532 alarms.get() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, alarms, get
Gets an alarm, given its name. The alarm is passed into a callback function as an alarms.Alarm object.
533 alarms.getAll() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, alarms, getAll
Gets all active alarms. The alarms are passed into a callback, as an array of alarms.Alarm objects.
534 alarms.onAlarm API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, alarms, onAlarm
Fired when any alarm set by this add-on goes off.
535 bookmarks API, Add-ons, Bookmarks, Extensions, Interface, Non-Standard, Non-standard, Reference, WebExtensions, add-ons
The WebExtensions bookmarks API lets an add-on 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.
536 bookmarks.BookmarkTreeNode API, Add-ons, BookmarkTreeNode, Bookmarks, Extensions, Non-standard, Reference, Type, WebExtensions, add-ons
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.
537 bookmarks.BookmarkTreeNodeUnmodifiable API, Add-ons, BookmarkTreeNodeUnmodifiable, Bookmarks, Extensions, Non-standard, Reference, Type, WebExtensions, add-ons
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.
538 bookmarks.CreateDetails API, Add-ons, Bookmarks, CreateDetails, Extensions, Non-standard, Reference, Type, WebExtensions, add-ons
The CreateDetails type is used to describe the properties of a new bookmark or bookmark folder when calling the bookmarks.create() method.
539 bookmarks.create() API, Add-ons, Bookmarks, Create, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, create
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.
540 bookmarks.get() API, Add-ons, Bookmarks, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, get
Given the ID of a bookmarks.BookmarkTreeNode or an array of such IDs, the bookmarks.get() method retrieves the matching nodes and delivers them to a specified callback function.
541 bookmarks.getChildren() API, Add-ons, Bookmarks, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getChildren
bookmarks.getChildren() retrieves all the immediate children of a given bookmark folder, identified as a BookmarkTreeNode ID.
542 bookmarks.getRecent() API, Add-ons, Bookmarks, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getRecent
The bookmarks.getRecent() method retrieves a specified number of the most recently added bookmarks as an array of BookmarkTreeNode objects.
543 bookmarks.getSubTree() API, Add-ons, Bookmarks, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getSubTree
The bookmarks.getSubTree() method asynchronously retrieves a bookmarks.BookmarkTreeNode, given its ID.
544 bookmarks.getTree() API, Add-ons, Bookmarks, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getTree
bookmarks.getTree() returns an array containing the root of the bookmarks tree as a bookmarks.BookmarkTreeNode object.
545 bookmarks.move() API, Add-ons, Bookmarks, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
546 bookmarks.onChanged API, Add-ons, Bookmarks, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onChanged
Fired when there is a change to:
547 bookmarks.onChildrenReordered API, Add-ons, Bookmarks, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
548 bookmarks.onCreated API, Add-ons, Bookmarks, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onCreated
Fired when a bookmark or folder is created.
549 bookmarks.onImportBegan API, Add-ons, Bookmarks, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onImportBegan
Fired when the browser has started importing a set of bookmarks.
550 bookmarks.onImportEnded API, Add-ons, Bookmarks, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onImportEnded
Fired when the browser has finished importing a set of bookmarks.
551 bookmarks.onMoved API, Add-ons, Bookmarks, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onMoved
Fired when a bookmark or folder is moved to a different parent folder and/or position within a folder.
552 bookmarks.onRemoved API, Add-ons, Bookmarks, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
553 bookmarks.remove() API, Add-ons, Bookmarks, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, remove
The bookmarks.remove() method removes a single bookmark or an empty bookmark folder.
554 bookmarks.removeTree() API, Add-ons, Bookmarks, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, removeTree
The bookmarks.removeTree() method recursively removes a bookmark folder and all of its contents.
555 bookmarks.search() API, Add-ons, Bookmarks, Extensions, Method, Non-Standard, Non-standard, Reference, Search, WebExtensions, add-ons, search
The bookmarks.search() function searches for bookmarks matching the given query. Matching bookmarks are passed into the specified callback function asbgh an array of bookmarks.BookmarkTreeNode objects.
556 bookmarks.update() API, Add-ons, Bookmarks, Extensions, Method, Non-Standard, Non-standard, Reference, Update, WebExtensions, add-ons, update
bookmarks.update() updates the title and/or URL of a bookmark, or the name of a bookmark folder.
557 browserAction API, Add-ons, Extensions, Interface, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, browserAction
If you specify a popup, it will be shown — and the content will be loaded — when the user clicks the icon. If you do not specify a popup, then when the user clicks the icon an event is dispatched to your extension.
558 browserAction.ColorArray API, Add-ons, ColorArray, Extensions, Non-standard, Reference, Type, WebExtensions, add-ons, browserAction
An array of four integers in the range 0-255, defining an RGBA color. The four values specify the following channels:
559 browserAction.ImageDataType API, Add-ons, Extensions, ImageDataType, Non-standard, Reference, Type, WebExtensions, add-ons, browserAction
Pixel data for an image. Must be an ImageData object (for example, from a <canvas> element).
560 browserAction.disable() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, browserAction, disable
Disables the browser action for a tab, meaning that it cannot be clicked when that tab is active.
561 browserAction.enable() API, Add-ons, Enable, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, browserAction, enable
Enables the browser action for a tab. By default, browser actions are enabled for all tabs.
562 browserAction.getBadgeBackgroundColor() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, browserAction, getBadgeBackgroundColor
Gets the background color of the browser action's badge.
563 browserAction.getBadgeText() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, browserAction, getBadgeText
Gets the browser action's badge text.
564 browserAction.getPopup() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, browserAction, getPopup
Gets the HTML document set as the popup for this browser action.
565 browserAction.getTitle() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, browserAction, getTitle
Gets the browser action's title. Just as you can set the title on a per-tab basis using browserAction.setTitle(), so you can retrieve a tab-specific title by passing the tab's ID into this function.
566 browserAction.onClicked API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, browserAction, onClicked
Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.
567 browserAction.openPopup() API, Add-ons, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, browserAction, openPopup
This API is also available as browser.browserAction.openPopup() in a version that returns a promise.
568 browserAction.setBadgeBackgroundColor() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, browserAction, setBadgeBackgroundColor
Sets the background color for the badge.
569 browserAction.setBadgeText() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, browserAction, setBadgeText
Sets the badge text for the browser action. The badge is displayed on top of the icon.
570 browserAction.setIcon() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, browserAction, setIcon
Sets the icon for the browser action. The icon can be specified either as the path to an image file, the pixel data from a <canvas> element, or a dictionary of either one of those. Either the path or the imageData property must be specified.
571 browserAction.setPopup() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, browserAction, setPopup
Sets the HTML document that will be opened as a popup when the user clicks on the browser action's icon.
572 browserAction.setTitle() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
573 commands
Listen for the user executing commands that you have registered using the commands manifest.json key.
574 Command API, Add-ons, Command, Extensions, Non-Standard, Non-standard, Reference, Type, WebExtensions, add-ons, commands
Information about a command. This contains the information specified for the command in the commands manifest.json key.
575 getAll() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, commands, getAll
Gets all commands for this add-on that you have registered using the commands manifest.json key.
576 onCommand API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, commands, onCommand
This API is also available as browser.commands.onCommand.*.
577 contextMenus API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, add-ons, 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.
578 contextMenus.ACTION_MENU_TOP_LEVEL_LIMIT ACTION_MENU_TOP_LEVEL_LIMIT, API, Add-ons, Extensions, Non-Standard, Non-standard, Property, Reference, WebExtensions, add-ons, 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.
579 contextMenus.ContextType API, Add-ons, ContextType, Extensions, Non-Standard, Non-standard, Reference, Type, WebExtensions, add-ons, contextMenus
The different contexts a menu can appear in. Specifying "all" is equivalent to the combination of all contexts.
580 contextMenus.ItemType API, Add-ons, Extensions, ItemType, Non-Standard, Non-standard, Reference, Type, WebExtensions, add-ons, contextMenus, itemtype
The type of menu item.
581 contextMenus.OnClickData API, Add-ons, Extensions, Non-Standard, Non-standard, OnClickData, Reference, Type, WebExtensions, add-ons, contextMenus
Information sent when a context menu item is clicked.
582 contextMenus.create() API, Add-ons, Create, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, contextMenus, create
Creates a new context menu item.
583 contextMenus.onClicked API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, contextMenus, onClicked
Fired when a context menu item is clicked.
584 contextMenus.remove() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, contextMenus, remove
Removes a context menu item.
585 contextMenus.removeAll() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, contextMenus, removeAll
Removes all context menu items added by this add-on.
586 contextMenus.update() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, Update, WebExtensions, add-ons, contextMenus, update
Updates a previously created context menu item.
587 cookies API, Add-ons, Cookies, Extensions, Interface, Non-standard, Reference, WebExtensions, add-ons, cookies
Enables WebExtensions to get and set cookies, and be notified when they change.
588 cookies.Cookie API, Add-ons, Cookie, Cookies, Extensions, Non-standard, Reference, Type, WebExtensions, add-ons, cookie, cookies
The Cookie type of the cookies API represents information about an HTTP cookie.
589 cookies.CookieStore API, Add-ons, CookieStore, Cookies, Extensions, Non-Standard, Non-standard, Reference, Type, WebExtensions, add-ons, cookies
The CookieStore type of the cookies API represents a cookie store in the browser.
590 cookies.OnChangedCause API, Add-ons, Cookies, Extensions, Non-standard, OnChangedCause, Reference, Type, WebExtensions, add-ons, cookies
The OnChangedCause type of the cookies API represents the reason a cookie changed.
591 cookies.get() API, Add-ons, Cookies, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, cookies, get
The get() method of the cookies API retrieves information about a single cookie, given its name and URL.
592 cookies.getAll() API, Add-ons, Cookies, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, cookies, getAll
The getAll() method of the cookies API retrieves all cookies from a single cookie store that match the given information.
593 cookies.getAllCookieStores() API, Add-ons, Cookies, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, cookies, getAllCookieStores
The getAllCookieStores() method of the cookies API returns a list of all cookie stores.
594 cookies.onChanged API, Add-ons, Cookies, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, cookies, onChanged
The onChanged event of the cookies API is fired when a cookie is set or removed.
595 cookies.remove() API, Add-ons, Cookies, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, cookies, remove
The remove() method of the cookies API deletes a cookie, given its name and URL.
596 cookies.set() API, Add-ons, Cookies, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, cookies, 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.
597 downloads API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, add-ons, downloads
Enables WebExtensions 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.
598 downloads.BooleanDelta API, Add-ons, BooleanDelta, Extensions, Non-standard, Reference, Type, WebExtensions, add-ons, downloads
The BooleanDelta type of the downloads API represents the difference between two booleans.
599 downloads.DangerType API, Add-ons, DangerType, Extensions, Non-standard, Reference, Type, WebExtensions, add-ons, downloads
The DangerType type of the downloads API defines a set of possible reasons that a downloadable file might be considered dangerous.
600 downloads.DoubleDelta API, Add-ons, DoubleDelta, Extensions, Non-standard, Reference, Type, WebExtensions, add-ons, downloads
The DoubleDelta type of the downloads API represents the difference between two doubles.
601 downloads.DownloadItem API, Add-ons, DownloadItem, Extensions, Non-standard, Reference, Type, WebExtensions, add-ons, downloads
The DownloadItem type of the downloads API represents a downloaded file.
602 downloads.DownloadQuery API, Add-ons, DownloadQuery, Extensions, Non-standard, Reference, Type, WebExtensions, add-ons, 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.
603 downloads.DownloadTime API, Add-ons, DownloadTime, Extensions, Non-standard, Reference, Type, WebExtensions, add-ons, downloads
The DownloadTime type of the downloads API represents the time a download took to complete.
604 downloads.FilenameConflictAction API, Add-ons, Extensions, FilenameConflictAction, Non-standard, Reference, Type, WebExtensions, add-ons, downloads
The FilenameConflictAction type of the downloads API specifies what to do if the name of a downloaded file conflicts with an existing file.
605 downloads.InterruptReason API, Add-ons, Extensions, InterruptReason, Non-standard, Reference, Type, WebExtensions, add-ons, downloads
The InteruptReason type of the downloads API defines a set of possible reasons why a download was interrupted.
606 downloads.State API, Add-ons, Extensions, Non-standard, Reference, State, Type, WebExtensions, add-ons, downloads, state
The State type of the downloads API defines different states that a current download can be in.
607 downloads.StringDelta API, Add-ons, Extensions, Non-standard, Reference, StringDelta, Type, WebExtensions, add-ons, downloads
The StringDelta type of the downloads API represents the difference between two strings.
608 downloads.acceptDanger() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, acceptDanger, add-ons, downloads
The acceptDanger() function of the downloads API prompts the user to either accept or cancel a potentially dangerous download.
609 downloads.cancel() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, cancel, downloads
The cancel() function of the downloads API cancels a download.
610 downloads.download() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, download, downloads
The download() function of the downloads API downloads a file, given its URL and other optional preferences.
611 downloads.drag() API, Add-ons, Drag, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, downloads, drag
The drag() function of the downloads API initiates dragging the downloaded file to another application.
612 downloads.erase() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
613 downloads.getFileIcon() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, downloads, getFileIcon
The getFileIcon() function of the downloads API retrieves an icon for the specified download.
614 downloads.onChanged API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, downloads, onChanged
The onChanged() event of the downloads API is fired when any of a downloads.DownloadItem's properties changes (except for bytesReceived).
615 downloads.onCreated API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, downloads, onCreated
The onCreated() event of the downloads API fires when a download begins, i.e. when downloads.download() is sucessfully invoked.
616 downloads.onErased API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, downloads, onErased
The onErased() event of the downloads API fires when a download is erased from the browser history.
617 downloads.open() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, downloads, open
The open() function of the downloads API opens the downloaded file with its associated application.
618 downloads.pause() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, downloads, pause
The pause() function of the downloads API pauses a download.
619 downloads.removeFile() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, downloads, removeFile
The removeFile() function of the downloads API removes a downloaded file from disk.
620 downloads.resume() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, downloads, resume
The resume() function of the downloads API resumes a paused download.
621 downloads.search() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, Search, WebExtensions, add-ons, downloads, search
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.
622 downloads.setShelfEnabled() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
623 downloads.show() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, downloads, show
The show() function of the downloads API shows the downloaded file in its containing folder in the underlying platform's file manager.
624 downloads.showDefaultFolder() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, downloads, showDefaultFolder
The showDefaultFolder() function of the downloads API opens the default downloads folder in the platform's file manager.
625 events API, Add-ons, Events, Extensions, Interface, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, events
Common types used by APIs that dispatch events.
626 events.Event API, Add-ons, Event, Events, Extensions, Non-Standard, Non-standard, Reference, Type, WebExtensions, add-ons, events
An object which allows the addition and removal of listeners for a Chrome event.
627 events.Rule API, Add-ons, Events, Extensions, Non-standard, Reference, Rule, Type, WebExtensions, add-ons, events
Description of a declarative rule for handling events.
628 events.UrlFilter API, Add-ons, Events, Extensions, Non-Standard, Non-standard, Reference, Type, UrlFilter, WebExtensions, add-ons, events
Filters URLs for various criteria. If any of the given criteria match, then the whole filter matches.
629 extension API, Add-ons, Extension, Extensions, Interface, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, extension
Utilities related to your add-on. Get URLs to resources packages with your add-on, get the Window object for your add-on's pages, get the values for various settings. Note that the messaging APIs in this module are deprecated in favor of the equivalent APIs in the runtime module.
630 extension.ViewType API, Add-ons, Extension, Extensions, Non-Standard, Non-standard, Reference, Type, ViewType, WebExtensions, add-ons, extension
The type of extension view.
631 extension.getBackgroundPage() API, Add-ons, Extension, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, extension, getBackgroundPage
Alias for runtime.getBackgroundPage().
632 extension.getExtensionTabs() API, Add-ons, Extension, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, extension, 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.
633 extension.getURL() API, Add-ons, Extension, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, extension, getURL
Converts a relative path within an add-on's install directory to a fully-qualified URL.
634 extension.getViews() API, Add-ons, Extension, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, extension, getViews
Returns an array of the Window objects for each of the pages running inside the current extension. This includes, for example:
635 extension.inIncognitoContext API, Add-ons, Extension, Extensions, Non-Standard, Non-standard, Property, Reference, WebExtensions, add-ons, extension, inIncognitoContext
True for content scripts running inside incognito tabs, and for extension pages running inside an incognito process. The latter only applies to extensions with 'split' incognito_behavior.
636 extension.isAllowedFileSchemeAccess() API, Add-ons, Extension, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, extension, isAllowedFileSchemeAccess
This API is also available as browser.extension.isAllowedFileSchemeAccess() in a version that returns a promise.
637 extension.isAllowedIncognitoAccess() API, Add-ons, Extension, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, extension, isAllowedIncognitoAccess
Retrieves the state of the extension's access to Incognito-mode (as determined by the user-controlled 'Allowed in Incognito' checkbox.
638 extension.lastError API, Add-ons, Extension, Extensions, Non-Standard, Non-standard, Property, Reference, WebExtensions, add-ons, extension, lastError
An alias for runtime.lastError.
639 extension.onRequest API, Add-ons, Event, Extension, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, extension, onRequest
Fired when a request is sent from either an extension process or a content script.
640 extension.onRequestExternal API, Add-ons, Event, Extension, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, extension, onRequestExternal
Fired when a request is sent from another extension.
641 extension.sendRequest() API, Add-ons, Extension, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, extension, 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.
642 extension.setUpdateUrlData() API, Add-ons, Extension, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, extension, setUpdateUrlData
Sets parameters for the extension's update URL. This value is ignored for extensions that are hosted in the browser vendor's store.
643 extensionTypes API, Add-ons, Extensions, Interface, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, extensionTypes
Some common types used in other WebExtension APIs.
644 extensionTypes.ImageDetails API, Add-ons, Extensions, ImageDetails, Non-Standard, Non-standard, Reference, Type, WebExtensions, add-ons, extensionTypes
Details about the format and quality of an image.
645 extensionTypes.ImageFormat API, Add-ons, Extensions, ImageFormat, Non-Standard, Non-standard, Reference, Type, WebExtensions, add-ons, extensionTypes
The format of an image.
646 extensionTypes.InjectDetails API, Add-ons, Extensions, InjectDetails, Non-Standard, Non-standard, Reference, Type, WebExtensions, add-ons, extensionTypes
This object is used by:
647 extensionTypes.RunAt API, Add-ons, Extensions, Non-Standard, Non-standard, Reference, RunAt, Type, WebExtensions, add-ons, extensionTypes
The soonest that the JavaScript or CSS will be injected into the tab.
648 history API, Add-ons, Extensions, History, Interface, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, history
Use the history API to interact with the browser history.
649 history.HistoryItem API, Add-ons, Extensions, History, HistoryItem, Non-Standard, Non-standard, Reference, Type, WebExtensions, add-ons, history
A HistoryItem object provides information about a page in the browser history.
650 history.TransitionType API, Add-ons, Extensions, History, Non-Standard, Non-standard, Reference, TransitionType, Type, WebExtensions, add-ons, history
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.
651 history.VisitItem API, Add-ons, Extensions, History, Non-Standard, Non-standard, Reference, Type, VisitItem, WebExtensions, add-ons, history
An object describing a single visit to a page.
652 history.addUrl() API, Add-ons, Extensions, History, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, addUrl, history
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".
653 history.deleteAll() API, Add-ons, Extensions, History, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, deleteAll, history
Deletes all visits from the browser's history.
654 history.deleteRange() API, Add-ons, Extensions, History, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, deleteRange, history
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.
655 history.deleteUrl() API, Add-ons, Extensions, History, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, deleteUrl, history
Removes all visits to the given URL from the browser history.
656 history.getVisits() API, Add-ons, Extensions, History, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getVisits, history
Retrieves information about all visits to the given URL.
657 history.onVisitRemoved API, Add-ons, Event, Extensions, History, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, history, onVisitRemoved
Fired when a page is removed completely from the browser history.
658 history.onVisited API, Add-ons, Event, Extensions, History, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, history, 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.
659 history.search() API, Add-ons, Extensions, History, Method, Non-Standard, Non-standard, Reference, Search, WebExtensions, add-ons, history, search
Searches the browser's history for history.HistoryItem objects matching the given criteria.
660 i18n API, Add-ons, Extensions, Interface, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, i18n
Functions to internationalize your add-on. You can use these APIs to get localized strings from locale files packaged with your add-on, find out the browser's current language, and find out the value of its Accept-Language header.
661 Locale-Specific Message reference Internationalization, Localization, Reference, String, WebExtensions, i18n, message, messages.json, placeholders
Each internationalized WebExtension has at least one file named messages.json that provides locale-specific strings. This page describes the format of messages.json files.
662 i18n.LanguageCode API, Add-ons, Extensions, LanguageCode, Non-Standard, Non-standard, Reference, Type, WebExtensions, add-ons, i18n
A language tag such as "en-US" or "fr".
663 i18n.detectLanguage() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, detectLanguage, i18n
Detects the language of the provided text using the Compact Language Detector (CLD).
664 i18n.getAcceptLanguages() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
665 i18n.getMessage() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getMessage, i18n
Gets the localized string for the specified message.
666 i18n.getUILanguage() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getUILanguage, i18n
Gets the UI language of the browser. This is different from i18n.getAcceptLanguages which returns the preferred user languages.
667 idle API, Add-ons, Extensions, Idle, Interface, Non-Standard, Non-standard, Reference, WebExtensions, add-ons
Find out when the user's system is idle, locked, or active.
668 idle.IdleState API, Add-ons, Extensions, Idle, IdleState, Non-standard, Reference, Type, WebExtensions, add-ons
String describing the device's idle state.
669 idle.onStateChanged API, Add-ons, Event, Extensions, Idle, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onStateChanged
Fired when the system changes to an active, idle or locked state. The event fires with "locked" if the screen is locked or the screensaver activates, "idle" if the system is unlocked and the user has not generated any input for a specified number of seconds, and "active" when the user generates input on an idle system.
670 idle.queryState() API, Add-ons, Extensions, Idle, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
671 idle.setDetectionInterval() API, Add-ons, Extensions, Idle, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
672 management API, Add-ons, Extensions, Reference, WebExtensions, add-ons, management
Most of these operations require the "management" API permission. Operations that don't provide access to other add-ons don't require this permission.
673 ExtensionInfo API, Add-ons, ExtensionInfo, Extensions, Reference, Type, WebExtensions, add-ons, management
An ExtensionInfo object contains information about an add-on.
674 management.get() API, Add-ons, Method, Reference, WebExtensions, add-ons, get, management
Retrieves an ExtensionInfo object containing information about the specified add-on.
675 management.getAll() API, Add-ons, Method, Reference, WebExtensions, add-ons, getAll, management
Retrieves an array of ExtensionInfo objects, one for each installed add-on.
676 management.getPermissionWarningsById() API, Add-ons, Method, Reference, WebExtensions, add-ons, getPermissionWarningsById, management
Given the ID of an add-on, this function returns the permission warnings for it as an array of strings.
677 management.getPermissionWarningsByManifest() API, Add-ons, Method, Reference, WebExtensions, add-ons, 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.
678 management.getSelf() API, Add-ons, Method, Reference, WebExtensions, add-ons, getSelf, management
Retrieves an ExtensionInfo object containing information about the calling add-on.
679 management.onDisabled() API, Add-ons, Event, Reference, WebExtensions, add-ons, management, onDisabled
Fired when an add-on is disabled.
680 management.onEnabled() API, Add-ons, Event, Reference, WebExtensions, add-ons, management, onEnabled
Fired when an add-on is enabled.
681 management.onInstalled() API, Add-ons, Event, Reference, WebExtensions, add-ons, management, onInstalled
Fired when an add-on is installed.
682 management.onUninstalled() API, Add-ons, Event, Reference, WebExtensions, add-ons, management, onUninstalled
Fired when an add-on is uninstalled.
683 management.setEnabled() API, Add-ons, Method, Reference, WebExtensions, add-ons, management, setEnabled
Enables or disables the given add-on.
684 management.uninstall() API, Add-ons, Method, Reference, WebExtensions, add-ons, management, uninstall
Uninstalls an add-on, given its ID.
685 management.uninstallSelf() API, Add-ons, Method, Reference, WebExtensions, add-ons, management, uninstallSelf
Uninstalls the calling add-on.
686 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.
687 notifications.NotificationOptions API, Add-ons, Extensions, Non-Standard, Non-standard, NotificationOptions, Notifications, Reference, Type, WebExtensions, add-ons
This type contains all the data needed to:
688 notifications.TemplateType API, Add-ons, Extensions, Non-Standard, Non-standard, Notifications, Reference, TemplateType, Type, WebExtensions, add-ons
This is a string, and represents the type of notification to create. There are four types of notification: "basic", "image", "list", "progress".
689 notifications.clear() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Notifications, Reference, WebExtensions, add-ons, clear
Clears a notification, given its ID.
690 notifications.create() API, Add-ons, Create, Extensions, Method, Non-Standard, Non-standard, Notifications, Reference, WebExtensions, add-ons, create
Creates and displays a notification.
691 notifications.getAll() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Notifications, Reference, WebExtensions, add-ons, getAll
Gets the set of all current notifications created by the add-on.
692 notifications.onButtonClicked API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Notifications, Reference, WebExtensions, add-ons, onButtonClicked
Fired when the user clicks one of the notification's buttons.
693 notifications.onClicked API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Notifications, Reference, WebExtensions, add-ons, onClicked
Fired when the user clicks a notification, but not on any of the notification's buttons (for that, see notifications.onButtonClicked).
694 notifications.onClosed API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Notifications, Reference, WebExtensions, add-ons, onClosed
Fired when a notification is closed, either by the system or by the user.
695 notifications.update() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Notifications, Reference, Update, WebExtensions, add-ons, update
Updates a notification, given its ID.
696 pageAction API, Add-ons, Extensions, Interface, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, pageAction
A page action is a clickable icon inside the browser's address bar.
697 pageAction.ImageDataType API, Add-ons, Extensions, ImageDataType, Non-standard, Reference, Type, WebExtensions, add-ons, pageAction
Pixel data for an image.
698 pageAction.getPopup() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getPopup, pageAction
Gets the URL for the HTML document set as the popup for this page action.
699 pageAction.getTitle() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getTitle, pageAction
Gets the title of the page action.
700 pageAction.hide() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, hide, pageAction
Hides the page action for a given tab.
701 pageAction.onClicked API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onClicked, pageAction
Fired when a page action icon is clicked. This event will not fire if the page action has a popup.
702 pageAction.setIcon() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, pageAction, setIcon
Sets the icon for the page action. The icon can be specified as any of:
703 pageAction.setPopup() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, pageAction, setPopup
Sets the HTML document to be opened as a popup when the user clicks on the page action's icon.
704 pageAction.setTitle() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, pageAction, setTitle
Sets the title of the page action. This is displayed in a tooltip over the page action.
705 pageAction.show() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, pageAction, show
Shows the page action for a given tab. The page action is shown whenever the given tab is the active tab.
706 runtime API, Add-ons, Extensions, Interface, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, runtime
This module provides information about your add-on and the environment it's running in.
707 runtime.MessageSender API, Add-ons, Extensions, MessageSender, Non-standard, Reference, Type, WebExtensions, add-ons, runtime
An object containing information about the sender of a message or connection request; this is passed to the runtime.onMessage() listener.
708 runtime.OnInstalledReason API, Add-ons, Extensions, Non-standard, OnInstalledReason, Reference, Type, WebExtensions, add-ons, runtime
The reason that the runtime.onInstalled event is being dispatched.
709 runtime.OnRestartRequiredReason API, Add-ons, Extensions, Non-standard, OnRestartRequiredReason, Reference, Type, WebExtensions, add-ons, runtime
The reason that the onRestartRequired event is being dispatched.
710 runtime.PlatformArch API, Add-ons, Extensions, Non-standard, PlatformArch, Reference, Type, WebExtensions, add-ons, runtime
The machine's processor architecture.
711 runtime.PlatformInfo API, Add-ons, Extensions, Non-standard, PlatformInfo, Reference, Type, WebExtensions, add-ons, runtime
An object containing information about the current platform.
712 runtime.PlatformNaclArch API, Add-ons, Extensions, Non-Standard, Non-standard, PlatformNaclArch, Reference, Type, WebExtensions, add-ons, runtime
The native client architecture. This may be different from arch on some platforms.
713 runtime.PlatformOs API, Add-ons, Extensions, Non-standard, PlatformOs, Reference, Type, WebExtensions, add-ons, runtime
The operating system the browser is running on.
714 runtime.Port API, Add-ons, Extensions, Non-Standard, Non-standard, Port, Reference, Type, WebExtensions, add-ons, port, runtime
A Port object represents one end of a connection between two specific contexts, which can be used to exchange messages.
715 runtime.RequestUpdateCheckStatus API, Add-ons, Extensions, Non-standard, Reference, RequestUpdateCheckStatus, Type, WebExtensions, add-ons, runtime
Result of a call to runtime.requestUpdateCheck().
716 runtime.connect() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, connect, runtime
Make a connection between different contexts inside the extension.
717 runtime.connectNative() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, connectNative, runtime
For more information, see Native messaging.
718 runtime.getBackgroundPage() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getBackgroundPage, runtime
Retrieves the Window object for the background page running inside the current add-on.
719 runtime.getBrowserInfo()
Returns information about the browser in which this add-on is installed.
720 runtime.getManifest() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getManifest, runtime
This API is also available as browser.runtime.getManifest().
721 runtime.getPackageDirectoryEntry() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getPackageDirectoryEntry, runtime
Returns a DirectoryEntry object representing the package directory.
722 runtime.getPlatformInfo() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getPlatformInfo, runtime
Returns information about the current platform.
723 runtime.getURL() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getURL, runtime
This API is also available as browser.runtime.getURL().
724 runtime.id API, Add-ons, Extensions, Non-Standard, Non-standard, Property, Reference, WebExtensions, add-ons, id, runtime
The ID of the add-on.
725 runtime.lastError API, Add-ons, Extensions, Non-Standard, Non-standard, Property, Reference, WebExtensions, add-ons, lastError, runtime
This API is also available as browser.runtime.lastError.
726 runtime.onBrowserUpdateAvailable API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onBrowserUpdateAvailable, runtime
Fired when an update for the browser is available, but it isn't installed immediately because a browser restart is required.
727 runtime.onConnect API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onConnect, onconnect, runtime
Fired when a connection is made with either an add-on process or a content script.
728 runtime.onConnectExternal API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onConnectExternal, runtime
Fired when a connection is made with another extension.
729 runtime.onInstalled API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onInstalled, runtime
Fired when the add-on is first installed, when the add-on is updated to a new version, and when the browser is updated to a new version.
730 runtime.onMessage API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onMessage, onmessage, runtime
Fired when a message is received from either an extension process or a content script.
731 runtime.onMessageExternal API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onMessageExternal, runtime
Fired when a message is received from another extension/app. Cannot be used in a content script.
732 runtime.onRestartRequired API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
733 runtime.onStartup API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
734 runtime.onSuspend API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onSuspend, runtime
Sent to the event page just before it is unloaded. This gives the add-on 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.
735 runtime.onSuspendCanceled API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onSuspendCanceled, runtime
Sent after runtime.onSuspend to indicate that the app won't be unloaded after all.
736 runtime.onUpdateAvailable API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onUpdateAvailable, runtime
Fired when an update to the add-on is available. This event enables an add-on to delay an update: for example, because it is in the middle of some operation which should not be interrupted.
737 runtime.openOptionsPage() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, openOptionsPage, runtime
If your add-on does not have an options page, or the browser failed to create one for some other reason, runtime.lastError will be set.
738 runtime.reload() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, reload, runtime
Reloads the add-on.
739 runtime.requestUpdateCheck() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, requestUpdateCheck, runtime
Checks to see if an update for this add-on is available.
740 runtime.sendMessage() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, runtime, sendMessage
Sends a single message to event listeners within your extension or a different extension.
741 runtime.sendNativeMessage() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, runtime, sendNativeMessage
Sends a single message from a WebExtension to a native application.
742 runtime.setUninstallURL() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, runtime, setUninstallURL
Sets the URL to be visited when the add-on 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.
743 storage API, Add-ons, Extensions, Interface, Non-Standard, Non-standard, Reference, Storage, WebExtensions, add-ons, storage
Enables WebExtensions to store and retrieve data, and listen for changes to stored items.
744 storage.StorageArea API, Add-ons, Extensions, Non-Standard, Non-standard, Reference, Storage, StorageArea, Type, WebExtensions, add-ons, storage
StorageArea is an object representing a change to a storage area.
745 StorageArea.clear() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, Storage, StorageArea, WebExtensions, add-ons, remove, storage
Removes all items from the storage area.
746 StorageArea.get() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, Storage, StorageArea, WebExtensions, add-ons, get, storage
Retrieves one or more items from the storage area.
747 StorageArea.getBytesInUse() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, Storage, StorageArea, WebExtensions, add-ons, getBytesInUse, storage
Gets the amount of storage space, in bytes, used one or more items being stored in the storage area.
748 StorageArea.remove() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, Storage, StorageArea, WebExtensions, add-ons, remove, storage
Removes one or more items from the storage area.
749 StorageArea.set() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, Storage, StorageArea, WebExtensions, add-ons, set, storage
Stores one or more items in the storage area, or update existing items.
750 storage.StorageChange API, Add-ons, Extensions, Non-Standard, Non-standard, Reference, Storage, StorageChange, Type, WebExtensions, add-ons, storage
StorageChange objects contain the following properties:
751 storage.local API, Add-ons, Extensions, Non-Standard, Non-standard, Property, Reference, Storage, WebExtensions, add-ons, local, storage
Represents the local storage area. Items in local storage are local to the machine the add-on was installed on.
752 storage.managed API, Add-ons, Extensions, Non-Standard, Non-standard, Property, Reference, Storage, WebExtensions, add-ons, managed, storage
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.
753 storage.onChanged API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, Storage, WebExtensions, add-ons, onChanged, storage
Fired when one or more items change.
754 storage.sync API, Add-ons, Extensions, Non-Standard, Non-standard, Property, Reference, Storage, Sync, WebExtensions, add-ons, storage, sync
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.
755 tabs API, Add-ons, Extensions, Interface, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, tabs
Interact with the browser's tab system.
756 tabs.MutedInfo API, Add-ons, Extensions, MutedInfo, Non-standard, Reference, Type, WebExtensions, add-ons, tabs
This object contains a boolean indicating whether the tab is muted, and the reason for the last state change.
757 tabs.MutedInfoReason API, Add-ons, Extensions, MutedInfoReason, Non-standard, Reference, Type, WebExtensions, add-ons, tabs
Specifies the reason a tab was muted or unmuted.
758 tabs.TAB_ID_NONE API, Add-ons, Extensions, Non-Standard, Non-standard, Property, Reference, TAB_ID_NONE, WebExtensions, add-ons, tabs
A special ID value given to tabs that are not browser tabs (for example, tabs in devtools windows).
759 tabs.Tab API, Add-ons, Extensions, Non-standard, Reference, Tab, Type, WebExtensions, add-ons, 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.
760 tabs.TabStatus API, Add-ons, Extensions, Non-Standard, Non-standard, Reference, TabStatus, Type, WebExtensions, add-ons, tabs
Indicates whether the tab has finished loading.
761 tabs.WindowType API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, WindowType, add-ons, tabs
The type of window that hosts this tab.
762 tabs.ZoomSettings API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, ZoomSettings, add-ons, tabs
Defines zoom settings for a tab: modescope, and default zoom factor.
763 tabs.ZoomSettingsMode API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, ZoomSettingsMode, add-ons, tabs
Defines how zoom changes are handled. Add-ons can pass this value into tabs.setZoomSettings() to control how the browser handles attempts to change zoom settings for a tab. Defaults to "automatic".
764 tabs.ZoomSettingsScope API, Add-ons, Extensions, Non-Standard, Non-standard, Reference, Type, WebExtensions, ZoomSettingsScope, add-ons, 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.
765 tabs.captureVisibleTab() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
766 tabs.connect() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, connect, tabs
Call this function to set up a connection between the add-on's background scripts (or other privileged scripts, such as popup scripts or options page scripts) and any content scripts that belong to this add-on and are running in the specified tab. This function returns a runtime.Port object.
767 tabs.create() API, Add-ons, Create, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, create, tabs
Creates a new tab.
768 tabs.detectLanguage() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, detectLanguage, tabs
Detects the primary language of the content in a tab, using the Compact Language Detector (CLD).
769 tabs.duplicate() API, Add-ons, Duplicate, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, duplicate, tabs
Duplicates a tab, given its ID.
770 tabs.executeScript() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, executeScript, tabs
Injects JavaScript code into a page.
771 tabs.get() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, get, tabs
Given a tab ID, get the tab's details as a tabs.Tab object.
772 tabs.getAllInWindow() API, Add-ons, Deprecated, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getAllInWindow, tabs
Gets details about all tabs in the specified window.
773 tabs.getCurrent() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getCurrent, tabs
Get a tabs.Tab containing information about the tab that this script is running in.
774 tabs.getSelected() API, Add-ons, Deprecated, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getSelected, tabs
Gets the tab that is selected in the specified window.
775 tabs.getZoom() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getZoom, tabs
Gets the current zoom factor for the specified tab.
776 tabs.getZoomSettings() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getZoomSettings, tabs
Gets the current zoom settings for a specified tab.
777 tabs.highlight() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, highlight, tabs
This API is also available as browser.tabs.highlight() in a version that returns a promise.
778 tabs.insertCSS() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, insertCSS, tabs
Injects CSS into a page.
779 tabs.move() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, move, tabs
Moves one or more tabs to a new position in the same window or to a different window.
780 tabs.onActivated API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
781 tabs.onActiveChanged API, Add-ons, Deprecated, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
782 tabs.onAttached API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onAttached, tabs
Fired when a tab is attached to a window, for example because it was moved between windows.
783 tabs.onCreated API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onCreated, tabs
Fired when a tab is created.
784 tabs.onDetached API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onDetached, tabs
Fired when a tab is detached from a window, for example because it is being moved between windows.
785 tabs.onHighlightChanged API, Add-ons, Deprecated, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onHighlightChanged, tabs
Fired when the highlighted or selected tabs in a window changes.
786 tabs.onHighlighted API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onHighlighted, tabs
Fired when the set of highlighted tabs in a window changes.
787 tabs.onMoved API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onMoved, tabs
Fired when a tab is moved within a window.
788 tabs.onRemoved API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onRemoved, tabs
Fired when a tab is closed.
789 tabs.onReplaced API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onReplaced, tabs
Fired when a tab is replaced with another tab due to prerendering or instant.
790 tabs.onSelectionChanged API, Add-ons, Deprecated, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onSelectionChanged, tabs
Fires when the selected tab in a window changes.
791 tabs.onUpdated API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onUpdated, tabs
Fired when a tab is updated.
792 tabs.onZoomChange API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onZoomChange, tabs
Fired when a tab is zoomed.
793 tabs.query() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, query, tabs
Gets all tabs that have the specified properties, or all tabs if no properties are specified.
794 tabs.reload() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, reload, tabs
Reload a tab, optionally bypassing the local web cache.
795 tabs.remove() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, remove, tabs
Closes one or more tabs.
796 tabs.removeCSS() API, Add-ons, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, removeCSS, tabs
Removes from a page CSS which was previously injected by a call to tabs.insertCSS().
797 tabs.sendMessage() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, sendMessage, tabs
Sends a single message from the add-on's background scripts (or other privileged scripts, such as popup scripts or options page scripts) and any content scripts that belong to this add-on and are running in the specified tab.
798 tabs.sendRequest() API, Add-ons, Deprecated, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
799 tabs.setZoom() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, setZoom, tabs
Zooms the specified tab.
800 tabs.setZoomSettings() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, setZoomSettings, tabs
Sets zoom settings for the specified tab. These settings are reset to the default settings upon navigating the tab.
801 tabs.update() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, Update, WebExtensions, add-ons, tabs, update
Navigate the tab to a new URL, or modify other properties of the tab.
802 webNavigation API, Add-ons, Extensions, Interface, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
803 webNavigation.TransitionQualifier API, Add-ons, Extensions, Non-Standard, Non-standard, Reference, TransitionQualifier, Type, WebExtensions, add-ons, webNavigation
Values of this type are strings. Possible values are:
804 webNavigation.TransitionType API, Add-ons, Extensions, Non-Standard, Non-standard, Reference, TransitionType, Type, WebExtensions, add-ons, webNavigation
Cause of the navigation: for example, the user clicked a link, or typed an address, or clicked a bookmark.
805 webNavigation.getAllFrames() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, getAllFrames, webNavigation
Given a tab ID, retrieves information about all the frames it contains.
806 webNavigation.getFrame() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
807 webNavigation.onBeforeNavigate API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onBeforeNavigate, webNavigation
Fired when the browser is about to start a navigation event.
808 webNavigation.onCommitted API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
809 webNavigation.onCompleted API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
810 webNavigation.onCreatedNavigationTarget API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onCreatedNavigationTarget, webNavigation
Fired when a new window, or a new tab in an existing window, is created to host a navigation: for example, if the user opens a link in a new tab.
811 webNavigation.onDOMContentLoaded API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
812 webNavigation.onErrorOccurred API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
813 webNavigation.onHistoryStateUpdated API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
814 webNavigation.onReferenceFragmentUpdated API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onReferenceFragmentUpdated, webNavigation
This API is also available as browser.webNavigation.onReferenceFragmentUpdated.*.
815 webNavigation.onTabReplaced API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onTabReplaced, webNavigation
Fired when the contents of the tab is replaced by a different (usually previously pre-rendered) tab.
816 webRequest API, Add-ons, Extensions, Interface, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
817 webRequest.BlockingResponse API, Add-ons, BlockingResponse, Extensions, Non-Standard, Non-standard, Reference, Type, WebExtensions, add-ons, webRequest
An object of this type is returned by event listeners that have set "blocking" in their extraInfoSpec argument.
818 webRequest.HttpHeaders API, Add-ons, Extensions, HttpHeaders, Non-Standard, Non-standard, Reference, Type, WebExtensions, add-ons, webRequest
An array of HTTP headers. Each header is represented as an object with two properties: name and either value or binaryValue.
819 webRequest.MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES API, Add-ons, Extensions, MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES, Non-Standard, Non-standard, Property, Reference, WebExtensions, add-ons, webRequest
The maximum number of times that handlerBehaviorChanged() can be called in a 10 minute period.
820 webRequest.RequestFilter API, Add-ons, Extensions, Non-Standard, Non-standard, Reference, RequestFilter, Type, WebExtensions, add-ons, webRequest
An object describing filters to apply to webRequest events.
821 webRequest.ResourceType API, Add-ons, Extensions, Non-Standard, Non-standard, Reference, ResourceType, Type, WebExtensions, add-ons, webRequest
This type is a string, which represents a particular kind of resource fetched in a web request.
822 webRequest.UploadData API, Add-ons, Extensions, Non-Standard, Non-standard, Reference, Type, UploadData, WebExtensions, add-ons, webRequest
Contains data uploaded in a URL request.
823 webRequest.handlerBehaviorChanged() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, handlerBehaviorChanged, webRequest
Suppose an add-on's job is to block web requests against a pattern, and the following scenario happens:
824 webRequest.onAuthRequired API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onAuthRequired, webRequest
Fired when the server sends a 401 status code: that is, when the server is asking the client to provide authentication credentials such as a username and password.
825 webRequest.onBeforeRedirect API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onBeforeRedirect, webRequest
Fired when a server-initiated redirect is about to occur.
826 webRequest.onBeforeRequest API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
827 webRequest.onBeforeSendHeaders API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
828 webRequest.onCompleted API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onCompleted, webRequest
Fired when a request has completed.
829 webRequest.onErrorOccurred API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onErrorOccurred, webRequest
Fired when a request could not be processed due to an error: for example, a lack of Internet connectivity.
830 webRequest.onHeadersReceived API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, 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.
831 webRequest.onResponseStarted API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onResponseStarted, webRequest
Fired when the first byte of the response body is received.
832 webRequest.onSendHeaders API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, add-ons, onSendHeaders, webRequest
This event is fired just before sending headers. If your add-on or some other add-on modified headers in onBeforeSendHeaders, you'll see the modified version here.
833 windows API, Add-ons, Extensions, Interface, Non-standard, Reference, WebExtensions, Windows, add-ons, 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.
834 windows.CreateType API, Add-ons, CreateType, Extensions, Non-standard, Reference, Type, WebExtensions, Windows, add-ons, windows
Specifies the type of browser window to create.
835 windows.WINDOW_ID_CURRENT API, Add-ons, Extensions, Non-Standard, Non-standard, Property, Reference, WINDOW_ID_CURRENT, WebExtensions, Windows, add-ons, windows
The windowId for the current window.
836 windows.WINDOW_ID_NONE API, Add-ons, Extensions, Non-Standard, Non-standard, Property, Reference, WINDOW_ID_NONE, WebExtensions, Windows, add-ons, windows
The windowId value that represents the absence of a browser window.
837 windows.Window API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, Window, Windows, add-ons, windows
Information about a browser window.
838 windows.WindowState API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, WindowState, Windows, add-ons, windows
The state of this browser window.
839 windows.WindowType API, Add-ons, Extensions, Non-standard, Reference, Type, WebExtensions, WindowType, Windows, add-ons, windows
The type of browser window this is.
840 windows.create() API, Add-ons, Create, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, Windows, add-ons, create, windows
Creates a new window.
841 windows.get() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, Windows, add-ons, get, windows
Gets details about a window, given its ID. The details are passed into a callback.
842 windows.getAll() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, Windows, add-ons, getAll, windows
Gets information about all open windows, passing them into a callback.
843 windows.getCurrent() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, Windows, add-ons, getCurrent, windows
Gets the current window, passing its details into a callback.
844 windows.getLastFocused() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, Windows, add-ons, getLastFocused, windows
Gets the window that was most recently focused — typically the window 'on top' — and passes it into a callback.
845 windows.onCreated API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, Windows, add-ons, onCreated, windows
Fired when a window is created.
846 windows.onFocusChanged API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, Windows, add-ons, onFocusChanged, windows
Fired when the currently focused window changes. Will be windows.WINDOW_ID_NONE if all browser windows have lost focus.
847 windows.onRemoved API, Add-ons, Event, Extensions, Non-Standard, Non-standard, Reference, WebExtensions, Windows, add-ons, onRemoved, windows
Fired when a window is closed.
848 windows.remove() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, WebExtensions, Windows, add-ons, remove, windows
Closes a window and all the tabs inside it, given the window's ID.
849 windows.update() API, Add-ons, Extensions, Method, Non-Standard, Non-standard, Reference, Update, WebExtensions, Windows, add-ons, update, windows
Updates the properties of a window. Use this to move, resize, and (un)focus a window, etc.
850 Match patterns
Match patterns are a way to specify groups of URLs: a match pattern matches a specific set of URLs. They are used by WebExtensions 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.
851 Modify a web page
One of the most common use cases for a browser add-on is to modify a web page. For example, an add-on might want to change the style applied to a page, hide particular DOM nodes, or inject extra DOM nodes into the page.
852 Native messaging
Native messaging enables a WebExtension to exchange messages with a native application installed on the user's computer. This enables native applications to provide a service to add-ons 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 add-on to populate web forms. Native messaging also enables add-ons to access resources that are not accessible through WebExtension APIs, such as some particular piece of hardware.
853 Porting a Google Chrome extension
WebExtensions 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:
854 Porting a legacy Firefox add-on
If you have a Firefox add-on developed using a legacy technology, such as XUL/XPCOM or the Add-on SDK, here's a very quick guide to updating.
855 Prerequisites
All you need is Firefox 45 or higher. See Your first WebExtension to get started.
856 Publishing your WebExtension
Once you've finished writing and testing your WebExtension, 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 add-on on AMO, you can participate in our community of users and creators, and find an audience for your add-on.
857 Temporary Installation in Firefox
To install an add-on temporarily:
858 Tips and Tricks
This page contains various tips and tricks which should be useful to many people developing WebExtensions.
859 User interface components
This article is an overview of the components you can use to build a WebExtension's user interface.
860 Using the JavaScript APIs
The WebExtension JavaScript APIs can be used inside the add-on's background scripts and in any browser action or page action popups that the add-on defines. A few of these APIs can also be accessed by an add-on's content scripts (see the list in the content script guide).
861 WebExtensions and the Add-on ID
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.
862 What are WebExtensions?
Add-ons extend and 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, add-ons can add new features to the browser or change the appearance or content of particular websites.
863 Your first WebExtension
In this article we'll walk through creating a WebExtension for Firefox, from start to finish. The add-on just adds a red border to any pages loaded from "mozilla.org" or any of its subdomains.
864 Your second WebExtension
No summary!
865 manifest.json
The manifest.json file is a JSON-formatted file, and is the only file that every WebExtension must contain.
866 applications
The applications key contains keys that are specific to a particular host application.
867 background scripts
Use the background key to include one or more background scripts, and optionally a background page in your extension.
868 browser_action
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.
869 commands
Use the commands key to define one or more keyboard shortcuts for your add-on.
870 content_scripts
Instructs the browser to load content scripts into web pages whose URL matches a given pattern.
871 content_security_policy
WebExtensions 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.
872 default_locale
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.
873 description
A short description of the extension, intended for display in the browser's user interface.
874 homepage_url
URL for the add-on's home page.
875 icons
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.
876 manifest_version
This key specifies the version of manifest.json used by this extension.
877 name
Name of the extension. This is used to identify the extension in the browser's user interface and on sites like addons.mozilla.org.
878 options_ui
Use the options_ui key to define an options page for your add-on.
879 page_action
A page action is an icon that your extension adds inside the browser's URL bar.
880 permissions
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.
881 short_name
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.
882 version
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.
883 web_accessible_resources
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.
884 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.
885 Why develop add-ons for Firefox
Add-ons have been a part of  Firefox since its first version, and they have been integral to its success. The power of the add-on platform and the openness of its ecosystem are key factors that have allowed add-ons to thrive and become one of the most important features in Firefox and other Mozilla applications. Developing add-ons is one of the ways in which you can make a significant and lasting contribution to the Mozilla Mission.
886 Working with AMO AMO, Add-ons, Extensions, Preferences, add-ons
AMO (addons.mozilla.org) is the main add-ons hosting site for Firefox and other Mozilla applications. Although you can distribute your add-ons on your own website, AMO provides free hosting and update services as long as you comply with their basic guidelines.
887 Working with multiprocess Firefox
In current versions of desktop Firefox, chrome code (including code inserted by extensions) and content run in the same operating system process. So extensions can access content directly:

Document Tags and Contributors

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