Window.sidebar

  • Revision slug: DOM/window.sidebar
  • Revision title: window.sidebar
  • Revision id: 99557
  • Created:
  • Creator: Mnyromyr
  • Is current revision? No
  • Comment 57 words added

Revision Content

{{ DomRef() }}

Summary

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:

Method Description
addPanel(title, contentURL, customizeURL) Add a sidebar panel. See Creating a Firefox sidebar for details on sidebars in Firefox 2 and higher.
addPersistentPanel(title, contentURL, customizeURL) Add a sidebar panel, which is able to work in the background. Does only work this way in SeaMonkey or Firefox 1; Firefox 2 and higher will just do addPanel here as well.
addSearchEngine(engineURL, iconURL, suggestedTitle, suggestedCategory) Installs a search engine. See Adding search engines from web pages for details.
addMicrosummaryGenerator(generatorURL) Installs a microsummary generator. New in Firefox 2

Specification

Mozilla-specific. Not part of any standard.

{{ languages( { "ja": "ja/DOM/window.sidebar" } ) }}

Revision Source

<p>{{ DomRef() }}</p>
<h3 name="Summary">Summary</h3>
<p>Returns a sidebar object, which contains several methods for registering add-ons with browser.</p>
<h3 name="Example">Example</h3>
<pre class="eval">window.sidebar.addPanel("Google", "<span class="nowiki">http://www.google.com/</span>", "");
</pre>
<p>Note: the third empty parameter is required!</p>
<h3 name="Notes">Notes</h3>
<p>The sidebar object returned has the following methods:</p>
<table class="fullwidth-table"> <tbody> <tr> <th>Method</th> <th>Description</th> </tr> <tr> <td>addPanel(title, contentURL, customizeURL)</td> <td>Add a sidebar panel. See <a href="/en/Creating_a_Firefox_sidebar" title="en/Creating a Firefox sidebar">Creating a Firefox sidebar</a> for details on sidebars in Firefox 2 and higher. </td> </tr> <tr> <td>addPersistentPanel(title, contentURL, customizeURL)</td> <td>Add a sidebar panel, which is able to work in the background. Does only work this way in SeaMonkey or Firefox 1; Firefox 2 and higher will just do addPanel here as well.</td> </tr> <tr> <td>addSearchEngine(engineURL, iconURL, suggestedTitle, suggestedCategory)</td> <td>Installs a search engine. See <a href="/en/Adding_search_engines_from_web_pages" title="en/Adding_search_engines_from_web_pages">Adding search engines from web pages</a> for details.</td> </tr> <tr> <td>addMicrosummaryGenerator(generatorURL)</td> <td>Installs a microsummary generator. New in <a href="/en/Firefox_2_for_developers" title="en/Firefox_2_for_developers">Firefox 2</a></td> </tr> </tbody>
</table>
<h3 name="Specification">Specification</h3>
<p>Mozilla-specific. Not part of any standard.</p>

<p>{{ languages( { "ja": "ja/DOM/window.sidebar" } ) }}</p>
Revert to this revision