Changes

Jump to: navigation, search

Education/Learning/ModifyBrowser

263 bytes added, 22:15, 26 September 2010
Clarified how we identify the error in second attempt
chrome://global/content/bindings/tabbrowser.xml :: addTab :: line 1161" data: no]
Now we know how to find errors our JavaScript produces. Looking back at our codeThe line number in the source file may be larger than the one in the error message (download '''chrome://global/content/bindings/tabbrowser.xml''' in your new copy of Firefox to see the line numbers the browser is using). Since the error is in the '''else''' clause, it's clear that that '''childNodes.length''' is not zero, but 1 by default (i.e., there is always every window contains at least one tab, even if it isn't the tab controls are not visible). A quick modification to the code, and we get:
if (this.mTabContainer.childNodes.length '''== 1''') {
2
edits

Navigation menu