mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
browser_tabview_bug627288.js cleanup
This commit is contained in:
parent
934beb1844
commit
cb8dff8bad
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user