Re: [csswg-drafts] [cssom-1] Should `CSSStyleSheetInit.baseURL` be validated? (#12974)

I came across this [comment](https://github.com/WICG/construct-stylesheets/issues/95#issuecomment-593545252) asking the same question, with the following comments agreeing on resolving the base URL using the document base URL (the style sheet relevant settings object’s API base URL).

Should a resolution be taken from the WICG/CSSWG, or can [CSSOM](https://drafts.csswg.org/cssom-1/#create-a-constructed-cssstylesheet) be updated with something like this?

  > 3. Let `absoluteBaseURL` be the result from [resolving a style resource URL](https://drafts.csswg.org/css-values-4/#resolve-a-style-resource-url) from `baseURL` and `sheet`. If the result is a failure, throw a [NotAllowedError](https://webidl.spec.whatwg.org/#notallowederror) [DOMException](https://webidl.spec.whatwg.org/#idl-DOMException) and abort these steps. Otherwise, set `sheet`’s stylesheet base URL to the `baseURL` attribute value from `options`.

-- 
GitHub Notification of comment by cdoublev
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12974#issuecomment-3511839087 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 10 November 2025 14:01:07 UTC