667
edits
Changes
→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, 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:
// Insert tab after current tab, not at end.
var currentTabIndex = this.mTabContainer.selectedIndex;
this.mTabContainer.insertBefore(t, this.mTabContainer.childNodes.item(currentTabIndex + 1));