Skip to content

Instantly share code, notes, and snippets.

@townivan
Created November 7, 2019 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save townivan/d5d63a828b365779cf006b3ee52c28bb to your computer and use it in GitHub Desktop.
Save townivan/d5d63a828b365779cf006b3ee52c28bb to your computer and use it in GitHub Desktop.
ie11 JS work-arounds
// converting nodelist to an array...for ie11:
// ie11 won't like [...nodelist] or Array.from(nodelist) so use:
let elements = Array.prototype.slice.call(document.querySelectorAll('.things'));
// looping through the array....for ie11:
// ie11 won't like elements.map() so use:
elements.forEach(function(el) {
console.log('el:', el);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment