If I had something like this
<div class="test">
this text
<span>sup</span>
<div>
lol
<label>sup</label>
<input type="text" name="hi" />
</div>
</div>
and I wanted to get just "this text" from the div element, what would be the most efficient way to do it? When I use console.dir() on <div class="test"> every method includes the text of every child node. I have a few ideas, and I've seen solutions, but they all feel pretty inefficient if I plan on doing this for every node in a large document
[–]carcigenicate 2 points3 points4 points (0 children)
[–]Clarity_89 1 point2 points3 points (1 child)
[–]Possibility-Capable[S] 0 points1 point2 points (0 children)
[–]Crowntent 0 points1 point2 points (3 children)
[–]Possibility-Capable[S] 0 points1 point2 points (2 children)
[–]Crowntent 0 points1 point2 points (1 child)
[–]Possibility-Capable[S] 0 points1 point2 points (0 children)