Closed Bug 1404727 Opened 7 years ago Closed 7 years ago

Script modules don't work in extension popups

Categories

(WebExtensions :: General, defect, P5)

57 Branch
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1371551

People

(Reporter: jakob.linskeseder, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.29 Safari/537.36 Steps to reproduce: 1. Set `dom.moduleScripts.enabled` to `true`. 2. Load extension (see https://github.com/jaylinski/webextension-module-test) and click on the browser-action button. Actual results: No console output is shown in the debug window (Console tab). Expected results: In the deubg window, the console should list the following output: ``` main main.js:3:1 module a a.js:4:5 module b b.js:2:5 ``` There is a similar bug in Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=769012 I'm using Firefox Developer Edition 57.0b3 (64-bit) on Ubuntu 16.04 LTS. If the `popup.html` file is opened directly in the browser, everything works as expected.
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
Summary: Script modules don't work in extensions → Script modules don't work in extension popups
Priority: -- → P5
The according Chrome bug was fixed today: https://bugs.chromium.org/p/chromium/issues/detail?id=769012#c3
Hi, same problem here: if a document on the moz-extension:// protocol includes a local module script, the local imports won't be loaded and the script will not execute. The console reports Security Error: Content at moz-extension://extension-id/page.html may not load or link to file:///path/on/local/filesystem/of/the/imported/script. The file: path is shown if the extension is installed temporarily (via the about:debugging page). If the extension is properly installed a jar:file: URL is shown instead. If I put the full moz-extension:// URL in the import statement the script is loaded and executed.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.