Skip to content

Consider disallowing duplicate stylesheets #120

@nordzilla

Description

@nordzilla

I cannot think of any practical use to list the same sheet more than once in adoptedStyleSheets.

e.g.

const sheet = new CSSStyleSheet();
document.adoptedStyleSheets = [sheet, sheet, sheet];

While there's nothing technically "wrong" with doing this, it might be worth considering disallowing this action, which may help authors catch unintended usage in their code that would otherwise silently continue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions