mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 787078 - Load Reader UI on pageshow instead of DOMContentLoaded (r=mfinkle)
This commit is contained in:
parent
2cf0bd61a5
commit
41116deaf2
@ -2686,14 +2686,6 @@ Tab.prototype = {
|
|||||||
this.browser.removeEventListener("pagehide", listener, true);
|
this.browser.removeEventListener("pagehide", listener, true);
|
||||||
}.bind(this), 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;
|
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
|
// Once document is fully loaded, parse it
|
||||||
Reader.parseDocumentFromTab(this.id, function (article) {
|
Reader.parseDocumentFromTab(this.id, function (article) {
|
||||||
// Do nothing if there's no article or the page in this tab has
|
// Do nothing if there's no article or the page in this tab has
|
||||||
|
Loading…
Reference in New Issue
Block a user