Open main menu

CDOT Wiki β

Changes

Dive into Mozilla Modifying Firefox Lab

511 bytes added, 09:55, 12 March 2007
Success
==Success==
After repackaging the toolkit.jar file and running the browser, I'm able to confirm that this last change has been successful. Opening a new tab now works in the way I originally described. I make a few more tests to insure that I haven't broken anything else (e.g., "for example, what happens if I am on the last tab and not in the middle?". This works, which makes me realize that using '''append()''' is probably not necessary at all, and I can safely shorten my code down to the following:  var currentTabIndex = this.mTabContainer.selectedIndex; this.mTabContainer.insertBefore(t, this.mTabContainer.childNodes.item(currentTabIndex + 1)); This means that six lines of code become two, and with that reduction in number of lines, hopefully a reduction in new bugs I've added (NOTE: within reason, favour fewer rather than more lines of code).
=Reflections=