The ExtensionSidebarPane
object represents a pane that an extension has added to the sidebar in the browser's HTML/CSS inspector.
To create an ExtensionSidebarPane
, call the browser.devtools.panels.elements.createSidebarPane()
function.
devtools.panels.ExtensionSidebarPane.setExpression()
Evaluate a JavaScript expression in the web page that the inspector is inspecting. The result is displayed in the sidebar pane.
devtools.panels.ExtensionSidebarPane.setObject()
Sets a JSON object that will be displayed in the sidebar pane.
devtools.panels.ExtensionSidebarPane.setPage()
Loads the page pointed to by the supplied URL.
devtools.panels.ExtensionSidebarPane.onShown
devtools.panels.ExtensionSidebarPane.onHidden
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
onHidden |
Yes |
79 |
57
This event is only fired when the user switches between sidebar panes, not when the user switches between devtools panels. See bug 1412317.
|
? |
Yes |
No |
? |
? |
No |
? |
? |
? |
onShown |
Yes |
79 |
57
This event is only fired when the user switches between sidebar panes, not when the user switches between devtools panels. See bug 1412317.
|
? |
Yes |
No |
? |
? |
No |
? |
? |
? |
setExpression |
Yes
The expression must evaluate to a JavaScript object or a DOM node, or nothing is shown in the sidebar.
|
79
The expression must evaluate to a JavaScript object or a DOM node, or nothing is shown in the sidebar.
|
57
The expression must evaluate to an object that can be serialized to JSON, or nothing is shown in the sidebar. In particular, JavaScript cyclic objects and DOM nodes are not supported. See bug 1403130.
|
? |
Yes |
No |
? |
? |
No |
? |
? |
? |
setObject |
Yes
If the
jsonObject parameter is a string, it is not displayed. |
79
If the
jsonObject parameter is a string, it is not displayed. |
57
If the
jsonObject is a string, then rootTitle must also be given, or jsonObject will not be displayed. See bug 1412310. |
? |
Yes |
No |
? |
? |
No |
? |
? |
? |
Note: This API is based on Chromium's chrome.devtools.panels
API.
© 2005–2021 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