Skip to content

classList is parsed with regex when .contains() could be used #1884

@TrevorBurnham

Description

@TrevorBurnham

In the matchClass function in SelectorItem, a regex is used to split an element's className attribute in order to check whether that element has a particular class. It should be more efficient to just use classList.contains.

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