Blokks

Using polyfills

A polyfill is a piece of code used to provide modern functionality to older browsers that do not natively support it. Polyfills are not bundled with the Blokks embed, because it forces all users to download the polyfills regardless of whether they are necessary.

Instead, you have to add them manually. For example, here’s how you can add the ES6 Promise polyfill:

<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-promise/4.1.1/es6-promise.auto.min.js"></script>

<script defer src='https://themes.blokks.co/default/...'
  data-blokks-id='a34e542f'
  data-blokks-layout='columns'
</script>

Important: When you use polyfills, make sure they are loaded before you initialize the Blokks embed. You can add one or more polyfills depending on your browser coverage.