Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poly Loader

An event driven lazy polyfill loader.

How to use

import polyLoader from 'poly-loader';

const polyfillTests = [
    {
        test: typeof fetch === 'function',
        fill: './url/to/polyfills/fetch.min.js'
    }
];

window.addEventListener('donePolyfilling', bootStrapYouApp);

polyLoader(polyfillTests);

If there are errors loading the polyfill a polyfillError event will be emitted

window.addEventListener('polyfillError', function (e) {
    console.log('Polyfill failed to load: ', e.detail.polyfillSrc)
});

About

An event driven polyfill loader

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages