devtools.panels.ExtensionSidebarPane.setPage()

Sets an HTML page to be displayed in the sidebar pane.

This is an asynchronous function that returns a Promise.

Syntax

js
browser.devtools.panels.setPage(
  path // string containing relative path to page
)

Parameters

extensionPageURL

string. The relative path of an HTML page to display within the sidebar.

Return value

A Promise that will be fulfilled with no arguments, once the URL has been set.

The selected page will not be loaded until the user selects the devtools sidebar.

Examples

Create a new pane, and populate it with an HTML page. You could run this code in a script loaded by your extension's devtools page.

js
function onCreated(sidebarPane) {
  sidebarPane.setPage("sidebar/sidebar.html");
}

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
setPage
Chrome – Full support
Chrome 18 (Release date: 2012-03-28)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 57 (Release date: 2017-11-14)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support

Note: This API is based on Chromium's chrome.devtools.panels API.