devtools.panels
Note:Although the APIs are based on theChrome devtools APIs, there are still many features that are not yet implemented in Firefox, and therefore are not documented here. To see which features are currently missing please seeLimitations of the devtools APIs.
Thedevtools.panels API lets a devtools extension define its user interface inside the devtools window.
The devtools window hosts a number of separate tools - the JavaScript Debugger, Network Monitor, and so on. A row of tabs across the top lets the user switch between the different tools. The window hosting each tool's user interface is called a "panel".
With thedevtools.panels API you can create new panels in the devtools window.
Like all thedevtools APIs, this API is only available to code running in the document defined in thedevtools_page manifest.json key, or in other devtools documents created by the extension (such as the panel's own document). SeeExtending the developer tools for more.
In this article
Types
devtools.panels.ElementsPanelRepresents the HTML/CSS inspector in the browser's devtools.
devtools.panels.ExtensionPanelRepresents a devtools panel created by the extension.
devtools.panels.ExtensionSidebarPaneRepresents a pane that an extension has added to the HTML/CSS inspector in the browser's devtools.
Properties
devtools.panels.elementsA reference to an
ElementsPanelobject.devtools.panels.themeNameThe name of the current devtools theme.
Functions
devtools.panels.create()Creates a new devtools panel.
Events
devtools.panels.onThemeChangedFired when the devtools theme changes.
Example extensions
Browser compatibility
Note:This API is based on Chromium'schrome.devtools.panels API.