Skip to content

json-module/parse-error.html tests implementation-defined filename property on error event #933

Closed
@dandclark

Description

@dandclark

Test List

https://wpt.fyi/results/html/semantics/scripting-1/the-script-element/json-module/parse-error.html?label=master&label=experimental&aligned&q=label%3Ainterop-2025-modules

Rationale

This test checks some details of an ErrorEvent thrown when an imported JSON module has a syntax error.

assert_true(e instanceof ErrorEvent, "ErrorEvent");
assert_equals(e.filename, new URL("parse-error.json", location).href);
assert_true(e.error instanceof SyntaxError, "SyntaxError");

But, the value of the filename property is implementation-defined. See https://html.spec.whatwg.org/#report-an-exception and https://html.spec.whatwg.org/#extract-error.

All browsers currently fail this test. The check for filename should be removed, or maybe the test should be removed from the focus area.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions