![]() While the alternative function querySelectorAll (which kinda makes getElementsB圜lassName obsolete) returns a collection which does have forEach natively, other methods like map or filter are missing, so this syntax is still useful. works on all array-like objects, not only arrays themselves, then good old array syntax is used to construct an array from the values. In older browsers which don't support om, you need to use something like Babel.ĮS6 also adds this syntax. Deleted elements are not visited.You can use om to convert collection to array, which is way cleaner than : om(document.getElementsB圜lassName("myclass")).forEach(
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |