From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/window/sidebar/index.html | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 files/zh-cn/web/api/window/sidebar/index.html (limited to 'files/zh-cn/web/api/window/sidebar') diff --git a/files/zh-cn/web/api/window/sidebar/index.html b/files/zh-cn/web/api/window/sidebar/index.html new file mode 100644 index 0000000000..5557b1f26c --- /dev/null +++ b/files/zh-cn/web/api/window/sidebar/index.html @@ -0,0 +1,40 @@ +--- +title: Window.sidebar +slug: Web/API/Window/sidebar +translation_of: Web/API/Window/sidebar +--- +
+ {{APIRef}} {{SeeCompatTable}}
+

Returns a sidebar object, which contains several methods for registering add-ons with browser.

+

Example

+
window.sidebar.addPanel("Google", "http://www.google.com/", "");
+
+

Note: the third empty parameter is required!

+

Notes

+

The sidebar object returned has the following methods:

+ + + + + + + + + + + + + + + + + + + + + + + +
MethodDescription
addPanel(title, contentURL, customizeURL) {{Obsolete_inline(23)}}Adds a sidebar panel. See Creating a Firefox sidebar for details on sidebars in Firefox 2 and later.
addPersistentPanel(title, contentURL, customizeURL) {{Obsolete_inline(23)}}Adds a sidebar panel, which is able to work in the background. This only works in SeaMonkey or Firefox 1.x; Firefox 2 and later will just do addPanel().
addSearchEngine(engineURL, iconURL, suggestedTitle, suggestedCategory)Installs a search engine. See Adding search engines from web pages for details.
addMicrosummaryGenerator(generatorURL) {{gecko_minversion_inline("1.8.1")}} {{Obsolete_inline(6)}}Installs a microsummary generator.
+

Specification

+

Mozilla-specific. Not part of any standard.

-- cgit v1.2.3-54-g00ecf