|
|
|
|
|
by maga
3624 days ago
|
|
I believe it's a joke. At least I opened these comments thinking it was a joke akin to VanillaJS framework[1]. querySelectorAll returns an empty array if there are no matches, you don't need fancy string messages or errors for that. [1] http://vanilla-js.com/ |
|
An empty NodeList[1] to be precise, which is sort of kind of like an array in that it has a length property and you can access its elements with index notation (`nodeList[0]`), but it doesn't inherit from Array.prototype, so it doesn't support methods like `forEach` or `map`.
[1] https://developer.mozilla.org/en-US/docs/Web/API/NodeList