arcadia-browser-shims
v1.1.0
Published
Browser and JS shims used by Arcadia
Downloads
3
Readme
arcadia-browser-shims
Browser and JS language shims used by Arcadia
Just require/import arcadia-browser-shims
, and the environment will be shimmed.
import 'arcadia-browser-shims';
Included shims
- JS language shims from arcadia-js-shims
- document.contains
- classlist-polyfill - Element.prototype.classList polyfill (only in browsers)
- raf - requestAnimationFrame polyfill for browsers and node
- requestIdleCallback
- whatwg-fetch - fetch polyfill (only in browsers, supports IE9+)
TouchList[Symbol.iterator]
- whenSymbol
andTouchList
are both present- element-closest - Element.prototype.closest polyfill (only in browsers)
- smoothscroll-polyfill - Scroll behavior specification polyfill (only in browsers)
Only browser shims
If you only want to bring in the browser shims and not the JS language shims
(from arcadia-js-shims
), you can import arcadia-browser-shims/browser-only
. If
you choose this route, you will want to be sure that you are properly bringing
in the language shims for the browsers you support somehow. For example:
import 'arcadia-js-shims/target/es2015';
import 'arcadia-browser-shims/browser-only';