Skip to content Skip to sidebar Skip to footer

How Does Javascript Execution Context Work In Firefox Extensions With Multiple Windows?

I am writing what should be a fairly straightforward firefox extension. But this is my first firefox-extension and my first javascript program, and I'm used to C and assembly-lang

Solution 1:

Can you upload your code to github, it would be easier to understand. Also why use window and why not a panel? You can put an iframe inside the panel? Anyways you aren't receiving pointer-events below the window because its covered. Try putting in the window css pointer-events:none; on the clarify window. However because you are using window.open it probably won't work, what you need to do is use Services.ww so like:

var {utils, Cu} = Components; Cu.import('resource://gre/modules/Services.jsm'); var win = Services.ww.openWindow(null, "YOUR_CLARIFY.HTML_URL_HERE", "_blank", "chrome", null);

when this window opens set the style of it to pointer-events:none

Now to make it not work inside the calrifyWindow, just add to the top of your code:

if (document.location.indexOf('clarify.html') > -1) {
    return;
}

Post a Comment for "How Does Javascript Execution Context Work In Firefox Extensions With Multiple Windows?"