This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var els = document.querySelectorAll('a'); | |
els.forEach(function(e){console.log(e.href);}); // TypeError: els.forEach is not a function | |
// Why? | |
// document.querySelectorAll returns a NodeList. | |
// First thing first, as opposed to other NodeList, this one is not live, mostly because the | |
// implementation of a live object would be terribly complicated for some selectors | |
// NodeList are a DOM interface introduced in DOM core level 1 (random guess) |
NewerOlder