Bug 1331599 - script-generated patch to replace removeEventListener calls with the once option when possible, r=jaws.
This commit is contained in:
@@ -47,10 +47,9 @@ function promisePopupShown(popup) {
|
||||
if (popup.state == "open") {
|
||||
resolve();
|
||||
} else {
|
||||
popup.addEventListener("popupshown", function onPopupShown(event) {
|
||||
popup.removeEventListener("popupshown", onPopupShown);
|
||||
popup.addEventListener("popupshown", function(event) {
|
||||
resolve();
|
||||
});
|
||||
}, {once: true});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user