Working with Tabs
ThunderBrowse has its own tab system based off of the original tab system of the Sameplace extension. Because ThunderBrowse ports a lot of Firefox properties, functions, and attributes, there are many similarities.
Available Functions
ThunderTabBrowser.addTab(url,refer,secret,postData,loadinbg) adds a new tab [see notes on adding tabs]
ThunderTabBrowser.loadHomePage() [3.2.6 and above] loads the user’s homepage in a new tab
ThunderTabBrowser.selectedTab(tab) allows you to set a tab if you pass an argument, gives you current tab if nothing is passed
ThunderTabBrowser.getBrowserForTab(tab) returns the <browser> element for the specified tab.
ThunderTabBrowser.getBrowserAtIndex(number)gives you the current browser for the specified tab index
ThunderTabBrowser.removeCurrentTab() removes current tab
ThunderTabBrowser.removeTab(tab) removes the tab specified
Adding Tabs
ThunderTabBrowser.addTab(url,refer,secret,postData,loadinbg)
url is the url for the new tab.
refer is the referrer for the new tab [3.2.6 and above].
secret is an internal argument. It must be null if you use it.
postData is if you want to make the load a POST request (you will need to character encode your data. See the formatting notes at the bottom of this page) [3.2.6 and above].
loadinbg is a bool argument that when true, will do the reverse of what the default tab focusing setting is [3.2.6 and above].
Formatting notes
Referrer URLs can be easily formatted via sending the string of the url to TbrowseDev.formatRefUri() as an argument. Returns the url as a formatted nsIUrl.
Formatting postData can be done by sending the post data (for example: q=google&hl=1) as a string to ThunderBrowseHandler.handlePostData().
