Skip to content

BaseURL is not specified correctly for CSS module scripts #11629

@dminor

Description

@dminor

What is the issue with the HTML Standard?

When constructing a CSS module script, Step 5 of the specification says "Let sheet be the result of running the steps to create a constructed CSSStyleSheet with an empty dictionary as the argument." and Step 2 of that specification says "Set sheet’s location to the base URL of the associated Document for the current global object.", but there's a web-platform test that checks that the BaseURL is the URI of the module script, not the document. The test was added here: web-platform-tests/wpt#29408.

I ran into this while implementing CSS module scripts in Firefox (See https://bugzilla.mozilla.org/show_bug.cgi?id=1720570). I've implemented the behaviour that makes the test pass, but that doesn't seem correct according to the specification. I think in this case it makes sense to update the specification to match the test behaviour.

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