Feature checks for support of forEach and event listener methods, and converted the NodeList childNodes to an array manually.
My forEach substitution is currently only made to provide a direct drop-in replacement for the exact forEach use-cases in the present code. This means if you want to add something like a context change later, or use the callback arguments as you would expect (aka, (current, index, array) instead of just (current)), it can be added to the polyfill pretty easily.
Really only making an issue for tracking purposes though since the PR is already submitted.
I need it. Some other people need it.
So I added it.
Feature checks for support of
forEach
and event listener methods, and converted the NodeListchildNodes
to an array manually.My
forEach
substitution is currently only made to provide a direct drop-in replacement for the exactforEach
use-cases in the present code. This means if you want to add something like a context change later, or use the callback arguments as you would expect (aka,(current, index, array)
instead of just(current)
), it can be added to the polyfill pretty easily.Really only making an issue for tracking purposes though since the PR is already submitted.