Root element to search within. Returns [] when el is nullish.
CSS selector passed to Element.querySelectorAll.
All matching HTMLElement nodes; non-HTML matches (e.g. SVG) are filtered out.
const container = document.createElement("div");
container.innerHTML = "<span>One</span><span>Two</span><svg><circle /></svg>";
querySelectorAll(container, "span"); // [HTMLSpanElement, HTMLSpanElement]
querySelectorAll(container, "span, circle"); // spans only
querySelectorAll(undefined, "span"); // []
Thin wrapper around
Element.querySelectorAll()that returnsHTMLElement[]instead ofNodeListOf<Element>.