Svelte: Class directive on IE 11 and older browsers

Created on 12 Sep 2018  路  5Comments  路  Source: sveltejs/svelte

< IE 11 and some older browsers support classList methods but don't support the .toggle() second boolean argument, resulting in erroneous behavior.

Maybe we could add a legacy alternative?

cc @jacwright

Most helpful comment

I know the polyfill solves this issue. I'm just bringing this here to see if it's something that the legacy flag should support 馃榿

All 5 comments

Use the Polyfill, Luke ;)

The polyfill does actually fill in the missing functionality with the second argument https://github.com/yola/classlist-polyfill/blob/master/src/index.js#L222

I know the polyfill solves this issue. I'm just bringing this here to see if it's something that the legacy flag should support 馃榿

This was addressed in 2.15.4 via #1868, closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robnagler picture robnagler  路  3Comments

Rich-Harris picture Rich-Harris  路  3Comments

ricardobeat picture ricardobeat  路  3Comments

1u0n picture 1u0n  路  3Comments

davidcallanan picture davidcallanan  路  3Comments