๐ฃ 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