I'm writing a FF addon where when a particular url is loaded in an iframe I intercept the request and load my own content instead by redirecting to a data URI and attaching a content script to the intercepted iframe. This works brilliantly on every version of FF except nightly with e10s enabled (it works with e10s disabled). In FF nightly with e10s, the frame is intercepted but the content script doesn't attach (it does attach to non-intercepted data uri iframes).
Any ideas on why this isn't working with e10s?
Here's my interception code:
function requestListener(event){
event.subject.QueryInterface(Ci.nsIHttpChannel);
let url = event.subject.URI.spec;
if(url == particularURL) {
event.subject.redirectTo(Services.io.newURI("data:text/html,CONTENT",null, null));
}
}
And here's where I attach my content script using page mod
's from FF's addon sdk:
pageMod.PageMod({
include: ["data:*"],
contentScriptFile: [data.url("myScript.js")],
contentScriptWhen: "ready",
attachTo: ["frame"],
onAttach: function(worker){
console.log("Attached"); //doesn't run with e10s
}
});