Closed simonaltrogge closed 3 years ago
Good point—I wasn't aware of that. The DOM spec is separate from the JavaScript spec, so ES2017 says nothing about this, but it does look like this has been widely supported since 2016. Attached patch removes the paragraph.
In chapter 14 you mention here that it is not possible to loop over a Node‘s
childNodes
property using afor/of
loop, since it is not a real array but aNodeList
.While it is true, that a
NodeList
is not an array, it is still iterable and therefore possible to be looped over viafor/of
according to the NodeList API on MDN.If that was not already the case for the 2017 version of JS, excuse my comment on that matter.
Best regards and thanks a lot for your magnificent book!