In this article, we'll put previous learnings to use for an n-ary tree i.e. DOM. We'll see how we can locate DOM elements using various CSS selectors without using inbuilt APIs like getElementById
, getElementsByClassname
or querySelector
/querySelectorAll
. The article would thus also throw light on how these APIs might be working under the hood.
Complete article here: https://stackfull.dev/applying-tree-traversal-algorithms-to-dom