About 169,000 results
Open links in new tab
  1. queryselectorall not working : r/learnjavascript - Reddit

    Aug 30, 2022 · The question I would have is, when are you executing the script? Because the distinction between querySelector (all) and getElement methods is that the NodeList you get in the former is not …

  2. How is forEach working on this NodeList object? - Reddit

    Oct 10, 2022 · trueThis subreddit is for anyone who wants to learn JavaScript or help others do so. Questions and posts about frontend development in general are welcome, as are all posts pertaining …

  3. Why does an HTML Collection with several entries show a length

    Apr 3, 2023 · I prefer using querySelectorAll, you could also do this: document.querySelectorAll("[class*='enemy___']") in case they change code after it, some sites do it …

  4. Why does querySelectorAll return a nodeList instead of an array?

    Jan 17, 2022 · So its a nodeList and not an array because languages like C# dont have a map function? Theres endless prototypal methods that return an array.. why does querySelector specifically avoid …

  5. How to add event listener to a nodelist : r/learnjavascript - Reddit

    Oct 17, 2023 · And then adding an event listener to run a function when either of the three buttons in the nodelist are pressed with choiceButtons.forEach (addEventListener ('click', myFunction));

  6. when using querySelectorAll, should I be converting it into an array ...

    Jul 13, 2022 · you get a nodelist when you use querySelectorAll, so should you copy it and put it in an array? I think read somewhere that some array methods won't work on nodelists.

  7. How to type JS using querySelectorAll or getElementsByClassName : r ...

    Apr 24, 2024 · Who knows. Now we know how to check single element. How do we check NodeList of elements? First you check length of it. That's kind of standard. Then there may be differences …

  8. Unable to transform node list to an array. : r/learnjavascript

    Mar 16, 2024 · To iterate over a nodeList, use forEach (). It can also be converted to a real Array using Array.from ().

  9. Cluster not communicating, Standalone node - no cluster defined

    Jan 31 23:10:39 BrownCoat corosync [1287]: [MAIN ] interface section bindnetaddr is used together with nodelist. Nodelist one is going to be used. Jan 31 23:10:39 BrownCoat corosync [1287]: [MAIN ] …

  10. Why do I get the 'is not a function' error when using code ... - Reddit

    The example is using getElementById which returns one DOM element because you're only allowed to use an ID once. You're using getElementsByClassName which returns an array of DOM elements …