Closed Bug 1839954 Opened 6 months ago Closed 5 months ago

<script> with type="module" doesn't work when placed inside <svg> element

Categories

(Core :: SVG, defect)

Firefox 114
defect

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: daniel.s.brinkmann, Assigned: longsonr)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

Steps to reproduce:

placed a <script> with type="module" inside an inline svg

Actual results:

nothing - the code wasn't executed

Expected results:

code should have run

What specification says that? What do other browsers do?

Flags: needinfo?(daniel.s.brinkmann)

Chrome and Safari executes the code as if it was placed outside the <svg>. I do not know if any specification mentions it explicitly.

Flags: needinfo?(daniel.s.brinkmann)

The Bugbug bot thinks this bug should belong to the 'Core::SVG' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → SVG
Product: Firefox → Core
Assignee: nobody → longsonr
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Severity: -- → S3
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/21669d226d64
support async defer and module scripts r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/40905 for changes under testing/web-platform/tests
Keywords: dev-doc-needed
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
Upstream PR merged by moz-wptsync-bot

Changes (relnote only) on MDN can be tracked in the following GitHub issue: https://github.com/mdn/content/issues/28294

You need to log in before you can comment on or make changes to this bug.