Method _.Query.all
Allows you to query the children of an element using a CSS style selector. Similar to how Element.querySelectorAll works in modern browsers.
- Calling Convention:
-
_.Query.all(Element, selector)
- Parameters
-
- Element
- The document Element node in which to search
- selector
- A CSS style selector to match
- Returns
- An Array of all document nodes that match the CSS.
Unlike Element.QuerySelectorAll this routine returns an Array, not a nodeList
. This is done so that:
- It was easier to make the IE polyfill return an Array, so the behavior across all browsers is consistent.
- You can leverage all those wonderful new features of Array that ECMAScript 5/newer introduced and that elementals.js takes the time to polyfill on IE11/earlier.