Skip to content

Selectors with whitespace within attribute selector fails to parse properly #31

@chriscapaci

Description

@chriscapaci

I'm attempting to use a selector that works with querySelector, but doesn't with the querySelectorDeep function in this package.

meta[name = 'some_name']

Stepping through the code, I eventually get to a point where it's trying to use this as the selector:

'some_name']

And fails at the .matches() call in collectAllElementsDeep with:

Error: Failed to execute 'matches' on 'Element': ''some_name']' is not a valid selector.

If I take the whitespace out it works fine. And like I said above, this same selector works in the browser's querySelector and querySelectorAll functions. So the parsing is incorrect in this package.

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