Skip to content

Inline module scripts report errors with incorrect line numbers #39415

@jdm

Description

@jdm

Testcase (a.html):

<script type="module">a</script>

Running this produces:
[2025-09-21T01:42:24Z ERROR script::dom::bindings::error] Error at file:///tmp/a.html:1:1 a is not defined

The script is on line 6, so this message is confusing.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions