How do you iterate over a NodeList (e.g. returned ...
# javascript
r
How do you iterate over a NodeList (e.g. returned by
querySelectorAll
). IntelliJ has
iterator
in code completion but the compiler does not know if if I use it. it suggests to import kotlin.js.iterator but that does not help either
g
Copy code
document.querySelectorAll("foo").asList().forEach { 
            
        }
👍 1
107 Views