Skip to content

Drop support for older versions of Chromium with frozen adoptedStyleSheets #2828

@nolanlawson

Description

@nolanlawson

The original adoptedStylesheet proposal used a frozen array. A follow-up proposal made the array mutable. Chromium 99+ and Firefox 101+ support mutable arrays.

We check if the array is mutable, to ensure backward compat:

const supportsMutableAdoptedStyleSheets =
supportsConstructableStyleSheets &&
getOwnPropertyDescriptor(document.adoptedStyleSheets, 'length')!.writable;

We should re-evaluate this in the future once we drop support for older versions of Chromium.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions