🗣 Using querySelectorAll to retrieve direct children
📘 :scope - Direct children
💾 replit: <dom-hierarchy>
// assume li is a <li> element li.querySelector(':scope > ul.methods') // select direct child <ul class="methods">
Last updated 3 years ago