$ npm install @asamuzakjp/dom-selector
Retrieve DOM node from the given CSS selector. Experimental
npm i @asamuzakjp/dom-selector
const {
matches, closest, querySelector, querySelectorAll
} = require('dom-selector');
Implementation of Element.matches().
Returns boolean Result
Implementation of Element.closest().
Returns object? Matched node
Implementation of Document.querySelector(), Element.querySelector().
Returns object? Matched node
Implementation of Document.querySelectorAll(), Element.querySelectorAll(). NOTE: returns Array, not NodeList.
Returns Array<(object | undefined)> Array of matched nodes
The following resources have been of great help in the development of the DOM Selector.
© 2010 - cnpmjs.org x YWFE | Home | YWFE