|
|
|
|
|
by joesb
4697 days ago
|
|
> The DOM gives you NodeList for querySelectorAll and an Element for querySelector. Because querySelector and querySelectorAll is not the same function, it can return different things. I don't know how this apply to your case where same dot traversal return different things. |
|
If you want to use HTML.js's find() or dot-traversal, you must accept that your decision point was moved to how you handle the return value. And that you can use each() and only() to write code that safely abstracts the difference in results. Not an increase in complexity, just a shifting of it to somewhere i currently prefer.