Mozilla XUL Element and Script Reference

Contents  Quick Reference

Tabbrowser

    Moz0.9.5

This element is used for holding a set of read-only views of Web documents. Similar to the browser element, except that mutliple documents can be displayed, each in a separate tab.

Attributes:

Attributes inherited from XUL Element

contentcontextmenu

contenttooltip

Properties and Methods:

Properties and Methods inherited from XUL Element

addProgessListener

addTab ( url )

Displays a new tab loading the specified URL as the document. The row of tabs will appear if needed.

canGoBack

This read-only property is true if there is a page to go back to in the session history and the Back button should be enabled.

canGoForward

This read-only property is true if there is a page to go forward to in the session history and the Forward button should be enabled.

contentDocument

This read-only property contains the document object in the tabbrowser.

contentViewerEdit

This read-only property contains the nsIContentViewerEdit which handles clipboard operations on the document.

contentViewerFile
contentWindow

This read-only property contains the window object for the document.

currentURI

This read-only property contains the currently loaded URL. To change the URL, use the loadURI method.

docShell

This read-only property contains the nsIDocShell object for the document.

documentCharsetInfo

This read-only property contains the nsIDocumentCharsetInfo object for the document which is used to handle which character set should be used to display the document.

getBrowserForTab

goBack ( )

Go back one page in the history.

goForward ( )

Go forward one page in the history.

goHome ( )

Load the user's home page into the tabbrowser.

gotoIndex ( index )

Navigate to the page in the history with the given index. Use a positive number to go forward and a negative number to go back.

homePage

This property holds the value of the user's home page setting.

loadURIWithFlags ( uri , flags , referrer )

Load a URL into the document, with the specified load flags and the given referrer. In addition to the flags allowed for the reloadWithFlags methods, the following flags are also valid:

loadURL

markupDocumentViewer

This read-only property contains the nsIMarkupDocumentViewer which is responsible for drawing the document.

preferences

This read-only property contains an nsIPref object for getting and setting user preferences.

reload ( )

Reloads the document in the tabbrowser.

reloadAllTabs ( )     Moz0.9.6

Reloads the contents of all of the tabs.

reloadTab ( tab )     Moz0.9.6

Reloads the contents of a specific tab.

reloadWithFlags ( flags )

Reloads the document in the tabbrowser with the given load flags. The flags listed below may be used, which are all constants of the webNavigation property (or the nsIWebNavigation interface). You may combine flags using a or symbol ( | )

removeAllTabsBut ( tabElement )

Removes all of the tab panels except for the one corresponding to the specified tab. If only one tab page is displayed, this method does nothing.

removeCurrentTab ( )

Removes the currently displayed tab page. If it is the only displayed tab, this method does nothing.

removeProgressListener ( listener )

Remove a progress listener from the tabbrowser.

removeTab ( tabElement )

Removes a specific tabbed page corresponding to the given tab element. If only one tab is displayed, this method does nothing. If needed, the row of tabs will collapse if only one tab remains.

selectedTab

Holds the currently selected tab. You can modify this property to change the currently selected tab page.

sessionHistory

This read-only property contains the nsISHistory object which holds the session history.

stop ( )

Equivalent to pressing the Stop button, this method stops the currently loading document.

webBrowserFind

This read-only property contains an nsIWebBrowserFind object which can be used to search for text in the document.

webNavigation

This read-only property contains the nsIWebNavigation object for the document. Most of its methods are callable directly on the tabbrowser itself, such as goBack and goForward. It also contains the load constants used by reloadWithFlags and loadURIWithFlags.

webProgress

This read-only property contains an nsIWebProgress object which is used to monitor the progress of a document loading.