Skip to content

[cssom-1] Should CSSStyleSheetInit.baseURL be validated? #12974

@cdoublev

Description

@cdoublev

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions