mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 787236 - Correctly remove "pagehide" listener for ErrorPageEventHandler (r=mfinkle)
This commit is contained in:
parent
2a29cb9531
commit
0678b5879a
@ -2681,10 +2681,12 @@ Tab.prototype = {
|
||||
// pages have any privilege themselves.
|
||||
if (/^about:/.test(target.documentURI)) {
|
||||
this.browser.addEventListener("click", ErrorPageEventHandler, false);
|
||||
this.browser.addEventListener("pagehide", function listener() {
|
||||
let listener = function() {
|
||||
this.browser.removeEventListener("click", ErrorPageEventHandler, false);
|
||||
this.browser.removeEventListener("pagehide", listener, true);
|
||||
}.bind(this), true);
|
||||
}.bind(this);
|
||||
|
||||
this.browser.addEventListener("pagehide", listener, true);
|
||||
}
|
||||
|
||||
if (/^about:reader/.test(target.documentURI)) {
|
||||
|
Loading…
Reference in New Issue
Block a user