Add a queryChildren method to dom.js
This commit is contained in:
parent
ed4e335978
commit
8eac54d49f
@ -78,4 +78,10 @@ DOM.remove = function (element) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DOM.queryChildren = function (element, selector) {
|
||||||
|
return Array.prototype.filter.call(element.childNodes, function (child) {
|
||||||
|
return DOM.matches(child, selector);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = DOM;
|
module.exports = DOM;
|
||||||
|
Loading…
Reference in New Issue
Block a user