sidebarAction
Gets and sets properties of an extension's sidebar.
A sidebar is a pane displayed at the left or right of a web page. The browser provides a UI that enables the user to see the available sidebars and select one to display. An extension defines sidebars using the sidebar_action manifest.json key. The extension can then get and set the sidebar's properties using this API.
Note:
Chrome provides support for sidebars through the sidePanel API. This API is not compatible with sidebarAction.
The sidebarAction API is based on Opera's sidebarAction API and closely modeled on the browserAction API. However, Firefox has not implemented setBadgeText(), getBadgeText(), setBadgeBackgroundColor(), getBadgeBackgroundColor(), onFocus, and onBlur.
Types
Functions
-
Closes the sidebar.
-
Gets the sidebar's panel.
-
Gets the sidebar's title.
-
Checks whether the sidebar is open.
-
Opens the sidebar.
-
Sets the sidebar's icon.
-
Sets the sidebar's panel.
-
Sets the sidebar's title. This title is displayed in any UI the browser provides to list sidebars, such as a menu.
-
Toggles the visibility of the sidebar.
Examples
Browser compatibility
| desktop | mobile | ||||||
|---|---|---|---|---|---|---|---|
sidebarAction
|
|
|
|
|
|
|
|
ImageDataType
|
|
|
|
|
|
|
|
close
|
|
|
|
|
|
|
|
getBadgeBackgroundColor
|
|
|
|
|
|
|
|
getBadgeText
|
|
|
|
|
|
|
|
getPanel
|
|
|
|
|
|
|
|
getPanel.details
|
|
|
|
|
|
|
|
details.windowId
|
|
|
|
|
|
|
|
getTitle
|
|
|
|
|
|
|
|
getTitle.details
|
|
|
|
|
|
|
|
details.windowId
|
|
|
|
|
|
|
|
isOpen
|
|
|
|
|
|
|
|
onBlur
|
|
|
|
|
|
|
|
onFocus
|
|
|
|
|
|
|
|
open
|
|
|
|
|
|
|
|
setBadgeBackgroundColor
|
|
|
|
|
|
|
|
setBadgeText
|
|
|
|
|
|
|
|
setIcon
|
|
|
|
|
|
|
|
setIcon.details
|
|
|
|
|
|
|
|
details.windowId
|
|
|
|
|
|
|
|
|
The
path and imageData properties of the details parameter can be set to null.
|
|
|
|
|
|
|
|
setPanel
|
|
|
|
|
|
|
|
setPanel.details
|
|
|
|
|
|
|
|
details.windowId
|
|
|
|
|
|
|
|
|
The
panel property of the details parameter can be set to null.
|
|
|
|
|
|
|
|
setTitle
|
|
|
|
|
|
|
|
setTitle.details
|
|
|
|
|
|
|
|
details.windowId
|
|
|
|
|
|
|
|
|
The
title property of the details parameter can be set to null.
|
|
|
|
|
|
|
|
toggle
|
|
|
|
|
|
|
|
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support