Bug 787078 - Load Reader UI on pageshow instead of DOMContentLoaded (r=mfinkle)

This commit is contained in:
Lucas Rocha 2012-08-30 16:28:39 +01:00
parent 3ce5f6b6c0
commit 7e61c8329b

View File

@ -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