Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

sidebarAction

Gets and sets properties of an extension's sidebar.

Asidebar 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 thesidebar_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 thesidePanel API. This API is not compatible withsidebarAction.

ThesidebarAction API is based on Opera'ssidebarAction API and closely modeled on thebrowserAction API. However, Firefox has not implementedsetBadgeText(),getBadgeText(),setBadgeBackgroundColor(),getBadgeBackgroundColor(),onFocus, andonBlur.

Types

sidebarAction.ImageDataType

Pixel data for an image. Must be anImageData object (for example, from a<canvas> element).

Functions

sidebarAction.close()

Closes the sidebar.

sidebarAction.getPanel()

Gets the sidebar's panel.

sidebarAction.getTitle()

Gets the sidebar's title.

sidebarAction.isOpen()

Checks whether the sidebar is open.

sidebarAction.open()

Opens the sidebar.

sidebarAction.setIcon()

Sets the sidebar's icon.

sidebarAction.setPanel()

Sets the sidebar's panel.

sidebarAction.setTitle()

Sets the sidebar's title. This title is displayed in any UI the browser provides to list sidebars, such as a menu.

sidebarAction.toggle()

Toggles the visibility of the sidebar.

Examples

Browser compatibility

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp