MDN wants to learn about developers like you:

You can include web pages in your extension to provide forms, help, or any other content your extension needs.

Example of a simple bundled page displayed as a detached panel.

These pages also get access to the same privileged JavaScript APIs that are available to your extension's background scripts.

Specifying bundled web pages

You can include HTML files, and their associated CSS or JavaScript files, in your extension. The files can be included in the root or organized within meaningful sub-folders.

Displaying bundled web pages

There are two options for displaying bundled web pages: windows.create() and tabs.create().

Using windows.create(), for example, you can open a bundled HTML page into a detached panel (a window without the normal browser UI of address bar, bookmark bar, and alike) to create a dialog-like user experience:

var createData = {
  type: "detached_panel",
  url: "panel.html",
  width: 250,
  height: 100
var creating =;

When the window is no longer needed, it can be closed programmatically, for example, after the user clicks a button, by passing the id of the current window to windows.remove():

document.getElementById("closeme").addEventListener("click", function(){
  var winId =;
  var removing =;

Bundled pages and history

By default, pages you open in this way will be stored in the user's history, just like normal web pages. If you don't want to have this behavior, use history.deleteUrl() to remove the browser's record:

const url = browser.extension.getURL("my-page.html");

browser.tabs.create({url}).then(() => {
  // We don't want to sync this URL ever nor clutter the users history
}).catch((e) => { throw e });


The webextensions-examples repo on GitHub, contains several examples of extensions that use a browser action:

Document Tags and Contributors

 Contributors to this page: wbamberg, andrewtruongmoz, hellosct1, rebloor
 Last updated by: wbamberg,