Open Bug 1538082 Opened 5 years ago Updated 2 years ago

Module scripts added to iframe via blob URL don't run

Categories

(Core :: DOM: Core & HTML, defect, P3)

66 Branch
Unspecified
All
defect

Tracking

()

UNCONFIRMED

People

(Reporter: neil.kronlage, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

Repro is available at: https://jsfiddle.net/ejdh87z3/

In this repro, it creates an iframe and injects a script in the iframe to create two js modules using URL.createObjectURL. The first module exposes a number (1234) and the second module imports the number and displays it in the hosting page.

https://jsfiddle.net/ejdh87z3/1/

Actual results:

In FireFox, the number is not displayed in the output pane of the jsfiddle.

Expected results:

The output pane of the jsfiddle should show 1234.

This works correctly in Safari and Chrome.

It also appears to work correctly in FireFox if you do it outside an iframe: https://jsfiddle.net/ejdh87z3/1/

Browser console shows:

Loading failed for the module with source “blob:https://fiddle.jshell.net/46918a32-91e4-4308-a210-7d70ae39a3c5”.

Has Regression Range: --- → yes
Has STR: --- → yes
Component: Untriaged → DOM: Core & HTML
OS: Unspecified → All
Product: Firefox → Core
Has Regression Range: yes → ---
Flags: needinfo?(jcoppeard)
Priority: -- → P3
Summary: Scripts added to iframe via blob URL don't run → Module scripts added to iframe via blob URL don't run
Blocks: 1538190
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.