Webextension not exposing chrome object in iframes

Hello, I’m porting a chrome extension to FF and trying to go with WebExtensions.
I’m seing a major difference between Chrome and Firefox:
if I create an iframe with a js script as src, the chrome object is not exposed in this script for the Firefox case, this is not the case with Chrome…
When the script is injected in the iframe (using chrome.tabs.executeScript , the chrome object becomes exposed.
Is this an expected behavior ? Any chance to see this corrected ?
Lots of extensions are using iframes for banners and the only workaround I can see is once iframe created to inject a script to all (main page & frames). Since this script is not intended to be used by main page, I’ll need to insert a frame-check at top of script to exit which requires major rework of the extension.

thanks in advance.

This is a very well defined bug report, so I suggest you file it here.

Jorge,

thank you very much for responding.
In mean time, I have found the exact same issue in the mozilla bug DB
and the fix is planned for FF46.
I will do some testing with Aurora 46 and report there.

thanks again.

rgds, Jean-Michel

hi,

could you please post the bugzilla bug ID here?
I’m having the same issue and would like to watch the progress on it…

thank you!

[here is the link:] https://bugzilla.mozilla.org/show_bug.cgi?id=1214658

1 Like

Tested with beta FF46. Works !