Skip to content

The shadowroot attribute gets special treatment, but the new shadowrootmode attribute should too #767

@mfreed7

Description

@mfreed7

See the code:

https://github.com/cure53/DOMPurify/blob/main/src/purify.js#L1465

The shadowroot attribute, which triggers "old-style" declarative shadow DOM, gets special treatment. See this issue for context: #584

Recently, the declarative Shadow DOM feature has had renewed interest, and as part of that conversation, the shadowroot attribute was renamed to shadowrootmode. Chrome has shipped this new attribute in M111. Chrome also will continue supporting the old shadowroot attribute for some time, as developers migrate.

I believe DOMPurify should be updated to look for both shadowroot and shadowrootmode.

@securityMB

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions