Search completed in 1.24 seconds.
Tabbed browser - Archive of obsolete content
you can detect when a tab becomes pinned or unpinned by watching for the tabpinned and
tabunpinned events.
... function exampletabpinned(event) { var browser = gbrowser.getbrowserfortab(event.target); // browser is the xul element of the browser that's been pinned } function example
tabunpinned(event) { var browser = gbrowser.getbrowserfortab(event.target); // browser is the xul element of the browser that's been pinned } // initialization var container = gbrowser.tabcontainer; container.addeventlistener("tabpinned", exampletabpinned, false); container.addeventlistener("
tabunpinned", example
tabunpinned, false); // when no longer needed container.removeeventlistener("tabpinned", exampletabpinned, false); container.removeeventlistener("
tabunpinned", example
tabunpinned, false); detecting tab selection the following code allows you to detect when a new tab is selected in the browser: function ex...