I wrote a firefox extension and for interation data between privilege and non-privilege pages I use this snipped code
//Listen for the event
window.addE
Are you sure things used to work before?
You need to set the 4th argument of addEventListener to true. Argument is called wantsUntrusted.
MDN :: addEventListener
Also see this topic here: How to listen to custom events on all windows, bubbling issue?
So try this:
//Listen for the event
window.addEventListener("MyEvent", function(evt) {
console.log(evt.detail);
}, false, true);
//Dispatch an event
var evt = document.createEvent("CustomEvent");
evt.initCustomEvent("MyEvent", true, true, {
name : 'activate',
method : function() {
//...
}
});
window.dispatchEvent(evt);