mozilla

Revision 329377 of Widgets

  • Revision slug: Social_API/Widgets
  • Revision title: Widgets
  • Revision id: 329377
  • Created:
  • Creator: ccarruitero
  • Is current revision? No
  • Comment
Tags: 

Revision Content

Widgets

SidebarWidget

If a service defines a SidebarWidget, the browser will instantiate a content region with the SidebarWidget URL as the location on some browser windows. These regions will not be instantiated until the Worker has been fully loaded. The content in these regions has the additional API defined in the Service Content API reference, above.

Sidebars can be in a visible or hidden state.

  • When visible, they will receive a vertical rectangle of screen space in which to render; this rectangle is stable across changes in tab focus and has an independent scrollbar from the scrollbar of tabbed browsing content.
  • When hidden, a sidebar is completely removed from the visual hierarchy. The user agent will continue to deliver messages to it, and the sidebar may pre-render its DOM for later display.

Sidebar windows will only be instantiated on browser windows that have a full tabbed-browsing interface; windows created with window.open that do not have these interface elements will not have a sidebar.

When a tab that is rendered directly by the browser without a location bar is selected, the sidebar will automatically be placed into the hidden state. When the user navigates away from that tab, the sidebar will be made visible again. These tabs include the Add-ons management page, about:permissions, etc.

The minimized/maximized/hidden state of the sidebar widget is will be consistent across all browser windows. The most-recently-set state is remembered and used for new windows, and is persisted across browser restarts.

Revision Source

<h1>Widgets</h1>
<h2>SidebarWidget</h2>
<p>If a service defines a SidebarWidget, the browser will instantiate a content region with the SidebarWidget URL as the location on some browser windows. These regions will not be instantiated until the Worker has been fully loaded. The content in these regions has the additional API defined in the Service Content API reference, above.</p>
<p>Sidebars can be in a <em>visible</em> or <em>hidden</em> state.</p>
<ul>
  <li>When visible, they will receive a vertical rectangle of screen space in which to render; this rectangle is stable across changes in tab focus and has an independent scrollbar from the scrollbar of tabbed browsing content.</li>
  <li>When hidden, a sidebar is completely removed from the visual hierarchy. The user agent will continue to deliver messages to it, and the sidebar may pre-render its DOM for later display.</li>
</ul>
<p>Sidebar windows will only be instantiated on browser windows that have a full tabbed-browsing interface; windows created with window.open that do not have these interface elements will not have a sidebar.</p>
<p>When a tab that is rendered directly by the browser without a location bar is selected, the sidebar will automatically be placed into the <em>hidden</em> state. When the user navigates away from that tab, the sidebar will be made <em>visible</em> again. These tabs include the Add-ons management page, about:permissions, etc.</p>
<p>The minimized/maximized/hidden state of the sidebar widget is will be consistent across all browser windows. The most-recently-set state is remembered and used for new windows, and is persisted across browser restarts.</p>
Revert to this revision