Sets an HTML page to be displayed in the sidebar pane.
This is an asynchronous function that returns a Promise
.
Sets an HTML page to be displayed in the sidebar pane.
This is an asynchronous function that returns a Promise
.
browser.devtools.panels.setPage( path // string containing relative path to page )
string
. The relative path of an HTML page to display within the sidebar.
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.
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.
function onCreated(sidebarPane) { sidebarPane.setPage('sidebar/sidebar.html'); }
No compatibility data found for webextensions.api.devtools.panels.ExtensionSidebarPane.setPage
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.
Note: This API is based on Chromium's chrome.devtools.panels
API.
© 2005–2022 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/devtools/panels/ExtensionSidebarPane/setPage