Search completed in 1.43 seconds.
Tabbed browser - Archive of obsolete content
inned", exampletabpinned, false); container.addeventlistener("tabunpinned", exampletabunpinned, false); // when no longer needed container.removeeventlistener("tabpinned", exampletabpinned, false); container.removeeventlistener("tabunpinned", exampletabunpinned, false); detecting tab selection the following code allows you to detect when a new tab is selected in the browser: function example
tabselected(event) { var browser = gbrowser.selectedbrowser; // browser is the xul element of the browser that's just been selected } // during initialisation var container = gbrowser.tabcontainer; container.addeventlistener("
tabselect", example
tabselected, false); // when no longer needed container.removeeventlistener("
tabselect", example
tabselected, false); getting document of currently selected ...
nsIWindowMediator
ventlistener("load", arguments.callee, false); //this removes this load function from the window //window has now loaded now do stuff to it //as example this will add a function to listen to tab select and will fire alert in that window if (domwindow.gbrowser && domwindow.gbrowser.tabcontainer) { domwindow.gbrowser.tabcontainer.addeventlistener('
tabselect', function () { domwindow.alert('tab was selected') }, false); } }, false); }, onclosewindow: function (awindow) {}, onwindowtitlechange: function (awindow, atitle) {} }; //to register services.wm.addlistener(windowlistener); //services.wm.removelistener(windowlistener); //once you want to remove this listener execute removelis...