Closed hooleyhoop closed 7 years ago
Hi @hooleyhoop, those tests are included before the script inits. There's also polyfills included if you need support for older IE's. Support for classList
goes back to IE9. Are you needing IE8 support?
It's a good call to add classList
as a check in the cut-the-mustard. I'm up for adding a polyfill but want to keep the core script lightweight. Thanks!
Sorry for the noise, a quick check of caniuse suggested ie9 didn't have support, but actually the errors i'm seeing are from old Safari (5) and Android Browser (2.3).
I think the cut-the-mustard check and polyfill can be completely avoided by using className instead of classList, so..
docElem.className += ' whatinput-types-' + currentInput;
instead of
docElem.classList.add('whatinput-types-' + currentInput);
could / should a check be added in with the “cut the mustard” tests for indexOf and EventListener? Alternatively classList could be avoided all together. Happy to help out if i can.