devtools.panels.ExtensionSidebarPane

The ExtensionSidebarPane object represents a pane that an extension has added to the sidebar in the browser's HTML/CSS inspector.

new pane titled "My pane" that displays a JSON object

To create an ExtensionSidebarPane, call the browser.devtools.panels.elements.createSidebarPane() function.

Functions

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.

Events

devtools.panels.ExtensionSidebarPane.onShown

Fired when the sidebar pane is shown.

devtools.panels.ExtensionSidebarPane.onHidden

Fired when the sidebar pane is hidden.

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
ExtensionSidebarPane
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
onHidden
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
footnote This event is only fired when the user switches between sidebar panes, not when the user switches between devtools panels. See bug 1412317.
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
onShown
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
footnote This event is only fired when the user switches between sidebar panes, not when the user switches between devtools panels. See bug 1412317.
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
setExpression
Chrome – Full support
Chrome 18 (Release date: 2012-03-28)
footnote
footnote The expression must evaluate to a JavaScript object or a DOM node, or nothing is shown in the sidebar.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote
footnote The expression must evaluate to a JavaScript object or a DOM node, or nothing is shown in the sidebar.
Firefox – Full support
Firefox 57 (Release date: 2017-11-14)
footnote
footnote Before Firefox 60, the expression must evaluate to an object that can be serialized to JSON, or nothing was shown in the sidebar. In particular, JavaScript cyclic objects and DOM nodes were not supported. See bug 1403130.
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote
footnote The expression must evaluate to a JavaScript object or a DOM node, or nothing is shown in the sidebar.
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
setHeight
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 – No support
Firefox
footnote No 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
setObject
Chrome – Full support
Chrome 18 (Release date: 2012-03-28)
footnote
footnote If the jsonObject parameter is a string, it is not displayed.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote
footnote If the jsonObject parameter is a string, it is not displayed.
Firefox – Full support
Firefox 57 (Release date: 2017-11-14)
footnote
footnote If the jsonObject is a string, then rootTitle must also be given, or jsonObject will not be displayed. See bug 1412310.
Opera – Full support
Opera 15 (Release date: 2013-07-02)
footnote
footnote If the jsonObject parameter is a string, it is not displayed.
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
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
See implementation notes.

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