addon-page

We are planning to deprecate the use by Firefox add-ons of the techniques described in this document.

Don't use these techniques to develop new add-ons. Use WebExtensions instead.

If you maintain an add-on which uses the techniques described here, consider migrating it to use WebExtensions instead.

Add-ons developed using these techniques might not work with multiprocess Firefox (e10s), which is already the default in Firefox Nightly and Firefox Developer Edition, and will soon be the default in Beta and Release versions of Firefox. We have documentation on making your add-ons multiprocess-compatible, but it will be more future-proof for you to migrate to WebExtensions.

A wiki page containing resources, migration paths, office hours, and more, is available to help developers transition to the new technologies.

Obsolete since Gecko 35 (Firefox 35 / Thunderbird 35 / SeaMonkey 2.32)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Create a page that does not contain navigational elements.

Usage

With the Add-on SDK you can present information to the user, such as a guide to using your add-on, in a browser tab. You can supply the content in an HTML file in your add-on's "data" directory.

Note: This module has no effect on Fennec.

For pages like this, navigational elements such as the Awesome Bar, Search Bar, or Bookmarks Toolbar are not usually relevant and distract from the content you are presenting. The addon-page module provides a simple way to have a page which excludes these elements.

To use the module import it using require(). After this, the page loaded from "data/index.html" will not contain navigational elements:

var addontab = require("sdk/addon-page");
var data = require("sdk/self").data;
 
require("sdk/tabs").open(data.url("index.html"));

This only affects the page at "data/index.html": all other pages are displayed normally.

Document Tags and Contributors

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