зеркало из https://github.com/mozilla/gecko-dev.git
Bug 787078 - Load Reader UI on pageshow instead of DOMContentLoaded (r=mfinkle)
This commit is contained in:
Родитель
2cf0bd61a5
Коммит
41116deaf2
|
@ -2686,14 +2686,6 @@ Tab.prototype = {
|
|||
this.browser.removeEventListener("pagehide", listener, true);
|
||||
}.bind(this), true);
|
||||
}
|
||||
|
||||
if (/^about:reader/.test(target.documentURI)) {
|
||||
let aboutReader = new AboutReader(this.browser.contentDocument, this.browser.contentWindow);
|
||||
this.browser.addEventListener("pagehide", function listener() {
|
||||
aboutReader.uninit();
|
||||
this.browser.removeEventListener("pagehide", listener, true);
|
||||
}.bind(this), true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2943,6 +2935,14 @@ Tab.prototype = {
|
|||
}
|
||||
});
|
||||
|
||||
if (/^about:reader/.test(aEvent.originalTarget.documentURI)) {
|
||||
let aboutReader = new AboutReader(this.browser.contentDocument, this.browser.contentWindow);
|
||||
this.browser.addEventListener("pagehide", function listener() {
|
||||
aboutReader.uninit();
|
||||
this.browser.removeEventListener("pagehide", listener, true);
|
||||
}.bind(this), true);
|
||||
}
|
||||
|
||||
// Once document is fully loaded, parse it
|
||||
Reader.parseDocumentFromTab(this.id, function (article) {
|
||||
// Do nothing if there's no article or the page in this tab has
|
||||
|
|
Загрузка…
Ссылка в новой задаче