Skip to content

Source order is not preserved when using multiple selectors #54

@Kilian

Description

@Kilian

querySelectorAll with multiple selectors returns the elements in source order. So the following HTML:

<h1> h1 </h1>
  <h2> h2 </h2>
    <h3> h3 </h3>
  <h2> h2 </h2>
    <h3> h3 </h3>

Combined with this javascript: document.querySelectorAll("h1, h2, h3"); will return [h1, h2, h3, h2, h3]. The equivalent querySelectorAllDeep however returns those listed selector by selector: [h1, h2, h2, h3, h3]. That can be quite an important difference. Is that worth fixing (I guess that might be difficult) or at least mentioning in the readme?

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