💾node.$(), .$all()
select child/children from parent node
🔰 JS ⟩ DOM ⟩ types ⟩ Node ⟩ node.$()
⬆️ 需要: $(), $all()
// ⭐️ node.$(selector)
// ⭐️ 放在 Node 上面就可以同時用在 Element, Document, DocumentFragment 上❗️
Node.prototype.$ = function(selector){
return $(selector, this);
};
// ⭐️ elem.$all()
Node.prototype.$all = function(selector){
return $all(selector, this);
};MDN ⟩ EventTarget ⟩ Node
Last updated
Was this helpful?