0.0.1 • Published 12 years ago
get-nodes v0.0.1
get nodes
Returns an array of all the elements within a dom element, including the dom element itself.
Installation
npm install get-nodesHow to use
Require get-nodes:
var getNodes = require("get-nodes");Given this DOM structure:
<header></header>
<section>
<div></div>
<div></div>
<div></div>
</section>
<footer></footer>To retrieve all the elements in section:
getNodes(document.querySelector("section"));
// [
// <section>,
// <div>,
// <div>,
// <div>
// ]LICENSE
MIT
0.0.1
12 years ago