dom-query
DOM query selector based on document.querySelector
with fallback engine support.
API
query(selector, [element])
Query selector
against the document or element
and return a single match.
;;
If selector is a dom element, it is returned right away.
query.all(selector, [element])
Query selector
against the document or element
and return an array of all matches.
queryall'ul > li';queryall'ul > li' root;
If selector is a dom element or a NodeList, it is returned and wrapped inside an array.
Fallback engines
To allow some fallback engine (for compatibility support) you can set it up with the following:
query;
Acknowledgement
This module has been built on top of component-query.