Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

domtokenlist-shim

jwilsson581MIT1.2.0

A super strict shim/polyfill for DOMTokenList

classlist, domtokenlist, polyfill, rellist, shim

readme

DOMTokenList shim

A super strict shim/polyfill for DOMTokenList, classList and relList. Small, < 1 kB minified and gzipped (~ 2kB minified).

Usage

All you need to do is include the JavaScript file and everything will be ready to go. If native DOMTokenList support is detected, nothing will be done.

<script src="domtokenlist.min.js"></script>

Browser support

  • Android - 2.3+
  • Edge - Current version and one version earlier
  • Google Chrome - Current version and one version earlier
  • Internet Explorer - 8+
  • iOS - 6.1+
  • Mozilla Firefox - Current version and one version earlier
  • Opera - Current version and one version earlier
  • Safari - 5.1+

License

MIT license. See LICENSE.md for more information.

Credits

Developed by Jonathan Wilsson and Bogdan Chadkin.

A big thanks to BrowserStack for sponsoring our test environment.

BrowserStack

changelog

Changelog

1.2.0 (2016-04-13)

  • Added support for SVG elements. (props @rodneyrehm)
  • Allow for loading in non-browser environments. (props @rodneyrehm)

1.1.1 (2015-11-25)

  • Fixed illegal relList constructor. (props @TrySound)

1.1.0 (2015-05-31)

  • add() and remove() with multiple arguments and toggle() with force argument are now shimmed where needed, enabling full support in all browsers. (props @TrySound, see #6 and #7).

1.0.2 (2015-05-12)

  • Use properties instead of attributes (props @TrySound, see #2).
  • Optimization of array handling (props @TrySound, see #4).

1.0.1 (2015-01-17)

  • Added to Bower.

1.0.0 (2014-09-08)

  • Initial release