[cssom-1] Should `CSSStyleSheetInit.baseURL` be validated?
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
baseURL is a CSSStyleSheet.constructor() argument that allows setting the style sheet 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). 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 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, while this procedure presumably expects an absolute URL. Should it be absolutized?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the CSSOM-1 definition of CSSStyleSheetInit.baseURL and the linked CSSStyleSheet-constructable-baseURL.html WPT. Compare the specification's URL handling with the browser behavior and test expectation. Done means the specification clearly resolves validation and absolutization, with the WPT expectation aligned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100