Bug 1367372 - use capture phase in DOMContentLoaded; r=pbro
MozReview-Commit-ID: 6qgQApIKAFN
--- a/devtools/server/actors/inspector.js
+++ b/devtools/server/actors/inspector.js
@@ -2431,17 +2431,17 @@ var WalkerActor = protocol.ActorClassWit
});
},
onFrameLoad: function ({ window, isTopLevel }) {
let { readyState } = window.document;
if (readyState != "interactive" && readyState != "complete") {
window.addEventListener("DOMContentLoaded",
this.onFrameLoad.bind(this, { window, isTopLevel }),
- { once: true });
+ { once: true, capture: true });
return;
}
if (isTopLevel) {
// If we initialize the inspector while the document is loading,
// we may already have a root document set in the constructor.
if (this.rootDoc && !Cu.isDeadWrapper(this.rootDoc) &&
this.rootDoc.defaultView) {
this.onFrameUnload({ window: this.rootDoc.defaultView });