Search completed in 1.34 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 example
tabpinned(event) { var browser = gbrowser.getbrowserfortab(event.target); // browser is the xul element of the browser that's been pinned } function exampletabunpinned(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", example
tabpinned, false); container.addeventlistener("tabunpinned", exampletabunpinned, false); // when no longer needed container.removeeventlistener("
tabpinned", example
tabpinned, 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 ...