tabbrowser

by 3 contributors:

Dependency On Browser Chrome

If you are building a stand-alone application you will find that the tabbrowser element expects that two menuitems are present, menu_closeWindow (Close Window) and menu_close (Close Tab). This is obviously a dependency on the browser chrome (at least in Firefox up to and including v2.0).

The problem appears on the first invocation of addTab() and results in the following error console message:

Error: document.getElementById("menu_closeWindow") has no properties Source File: chrome://global/content/bindings/tabbrowser.xml Line: 962

Adding menuitems with the required ids fixes the problem.

I have not investigated the reason for the dependancy. tabbrowser does not appear to hook itself into the menuitems in any way, you will have to implement your own code to close the current tab.

See bugĀ 327886 and bugĀ 339964. --Nickolay 22:46, 22 January 2007 (PST)


contentDocument property clarification?

I wanted to change the contentDocument property to make it clear that it is the contentDocument of the current selected browser, but it is included from a shared article for the contentDocument property. What would be the best way to change it to give tabbrowser's contentDocument property a different description?

Many of tabbrowser properties/methods forward to the selected browser. Perhaps it should just be mentioned on the top of the page? --Nickolay 08:11, 3 July 2007 (PDT)

Document Tags and Contributors

Contributors to this page: Nickolay, Emery, Rogerb
Last updated by: Nickolay,