- From: Guillaume via GitHub <noreply@w3.org>
- Date: Sat, 18 Oct 2025 07:44:27 +0000
- To: public-css-archive@w3.org
cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts: == [cssom-1] Should `CSSStyleSheetInit.baseURL` be validated? == [`baseURL`](https://drafts.csswg.org/cssom-1/#dom-cssstylesheetinit-baseurl) is a `CSSStyleSheet.constructor()` argument that allows setting the [style sheet base URL](https://drafts.csswg.org/cssom-1/#concept-css-style-sheet-stylesheet-base-url), which is: > The base URL to use when resolving relative URLs in the stylesheet. Null by default. Only non-null for stylesheets that have constructed flag set. Chrome always ignores it ([WPT](https://wpt.fyi/results/css/cssom/CSSStyleSheet-constructable-baseURL.html?label=master&label=experimental&aligned&q=css%2Fcssom%2FCSSStyleSheet-constructable-baseURL.html)). Firefox seems to handle an absolute URL or a relative URL ending with `/`, eg. `/css/`, `./css/`, `css/`, but `/css`, `./css`, `css`, are ignored. Besides, [WPT](https://github.com/web-platform-tests/wpt/blob/master/css/cssom/CSSStyleSheet-constructable-baseURL.html) expects `CSSStyleSheet.constructor()` to throw `NotAllowedError` for an *invalid base URL*, which seems unspecified, noting that the style sheet base URL is used to [*compute a style resource base URL*](https://drafts.csswg.org/css-values-4/#style-resource-base-url), while this procedure presumably expects an absolute URL. Should it be absolutized? Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12974 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 18 October 2025 07:44:28 UTC