jonathantneal / polyfill

A polyfill combinator
MIT License
738 stars 13 forks source link

classList polyfill not working #47

Closed Daniel-Hug closed 9 years ago

Daniel-Hug commented 10 years ago

Not one of the following will make "classList" in document.documentElement evaluate to true on my old android phone:

<script src="//polyfill.io/gimme(classList,DOMTokenList)"></script>
<script src="//polyfill.io/gimme(DOMTokenList,classList)"></script>
<script src="//polyfill.io/gimme(classList)"></script>
<script src="//polyfill.io/gimme(DOMTokenList)"></script>

Though, when I tried it with Remy Sharp's classList polyfill (https://github.com/remy/polyfills/blob/master/classList.js), it worked.

jonathantneal commented 10 years ago

Yea, it's pulling the wrong classList polyfill, Element.prototype.classList.ie7.js, by default. The right one is Element.prototype.classList.js.

jonathantneal commented 10 years ago

Also, this issue relates to #45.

The default Element.prototype.classList polyfill may rely on the Window.prototype.DOMTokenList polyfill (which may rely on the Array.prototype.indexOf polyfill) and the Object.defineProperties polyfill (which may rely on the Object.defineProperty polyfill).

triblondon commented 9 years ago

Polyfill variants has been completely rewritten for the new service. Check out cdn.polyfill.io for details.