can-child-nodes
childNodes(node)
Get all of the childNodes of a given node.
var stache = require("can-stache");
var childNodes = require("can-util/child-nodes/child-nodes");
var html = "<div><h1><span></span></h1></div>";
var frag = stache(html)();
console.log(childNodes(frag)[0].nodeName); // -> DIV
Parameters
- node
{Object}
:The Node that you want child nodes for.