Closed Bug 1542449 Opened 5 years ago Closed 5 years ago

[web extensions] “web‐accessible” page in iframe doesn’t have access to some APIs

Categories

(WebExtensions :: General, defect)

65 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1443253

People

(Reporter: zambonifofex, Unassigned)

Details

Attachments

(1 file)

1.27 KB, application/octet-stream
Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.96 Safari/537.36

Steps to reproduce:

I was trying to port a Chrome extension I made to work on Firefox, and it seems that there is a discrepancy between the available Web extensions APIs inside iframes across the two browsers.

To reproduce, one can make a page of the extension available to be used inside iframes through the ‘web_accessible_resources’ key in the extension’s manifest, and try to use some APIs from an iframe.

I’m going to include a zipped file with an example extension. To see the differences, after installing the extension, one can simply browse to any webpage, open the JavaScript console (Ctrl+Shift+I on both browsers), and enter the following:

document.write(`<iframe src="chrome-extension://EXTENSION_ID/main.html">`) // for Chrome
document.write(`<iframe src="moz-extension://EXTENSION_ID/main.html">`) // for Firefox

where ‘EXTENSION_ID’ is the arbitrary string that the browser assigned to the extension.

Actual results:

Some APIs were missing (such as ‘.tabs’ and ‘.runtime.openOptionsPage’).

Expected results:

I would expect that the available APIs would have been consistent across the two browsers and that the APIs available on Chrome would also be available on Firefox.

Attached file wxbug.zip

Sorry, I was not aware that Markdown was supported in this issue tracker, so I did not format my message appropriately.

I actually meant to write that the following should be inputted to the JavaScript console:

document.write(`<iframe src="chrome-extension://EXTENSION_ID/main.html">`) // for Chrome
document.write(`<iframe src="moz-extension://EXTENSION_ID/main.html">`) // for Firefox
Component: Untriaged → General
Product: Firefox → WebExtensions
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: