browser_tabview_bug627288.js cleanup

This commit is contained in:
Dão Gottwald 2011-06-13 08:37:33 +02:00
parent 934beb1844
commit cb8dff8bad

View File

@ -79,15 +79,12 @@ function test() {
// ----------
function whenTabAttrModified(tab, callback) {
let onModified = function (event) {
if (tab === event.target) {
container.removeEventListener('TabAttrModified', onModified, false);
tab.removeEventListener(event.type, onModified, false);
// we need executeSoon here because the tabItem also listens for the
// onTabAttrModified event. so this is to make sure the tabItem logic
// TabAttrModified event. so this is to make sure the tabItem logic
// is executed before the test logic.
executeSoon(callback);
}
}
let container = gBrowser.tabContainer;
container.addEventListener('TabAttrModified', onModified, false);
tab.addEventListener("TabAttrModified", onModified, false);
}