mozilla

Compare Revisions

Sidebar

Change Revisions

Revision 55311:

Revision 55311 by madarche on

Revision 55312:

Revision 55312 by Max1million on

Title:
Sidebar
Sidebar
Slug:
Code_snippets/Sidebar
Code_snippets/Sidebar
Tags:
Extensions, Add-ons, "Code snippets"
Extensions, Add-ons, "Code snippets"
Content:

Revision 55311
Revision 55312
nn68      Web Panels Sidebar
69    </h3>
70    <p>
71      Content such as web pages can be safely loaded as sidebar i
 >n the "viewWebPanelsSidebar". Bookmarks with "Load this bookmark 
 >in sidebar" checked in the properties open in the&nbsp; "viewWebP
 >anelsSidebar". A web page can use <a href="/en/DOM/window.sidebar
 >" title="window.sidebar">window.sidebar</a> to create bookmark wi
 >th that property. To open a page in the "viewWebPanelsSidebar" fr
 >om chrome code (browser/addon/extension) such as from menuitem, i
 >t can call:<br>
72      <code>openWebPanel(aTitle, aURI);</code>
73    </p>
74    <h3 name="Accessing_the_sidebar_from_a_browser.xul_script">
n98      For example to test if the <a class=" external" href="http:n105      For example to test if the <a class="external" href="http:/
>//mxr.mozilla.org/mozilla-central/source/browser/base/content/web>/mxr.mozilla.org/mozilla-central/source/browser/base/content/web-
>-panels.js" title="http://mxr.mozilla.org/mozilla-central/source/>panels.js" title="http://mxr.mozilla.org/mozilla-central/source/b
>browser/base/content/web-panels.js">web panel</a> from Firefox is>rowser/base/content/web-panels.js">web panel</a> from Firefox is 
> open:&nbsp;>open:&nbsp;
t165<span style="font-family: 'courier new';">    direction: rtl !impt172<span style="font-family: 'courier new';">    direction: rtl !imp
>ortant;<br>     }         </span><span style="font-family: 'couri>ortant;
>er new';"><br>hbox#browser &gt; vbox {</span> 
173     }         </span>
174<span style="font-family: 'courier new';">hbox#browser &gt; vbox 
 >{</span>
166<span style="font-family: 'courier new';">    direction: ltr !imp175<span style="font-family: 'courier new';">    direction: ltr !imp
>ortant; <br>   </span> }>ortant; 
176   </span> }

Back to History