@unocode/polyfills

0.1.1 • Public • Published

UnoCode Polyfills (UnoPolyfills)

Simulate IE behavior on newer browsers.

Instalation

You can install UnoPolyfills via npm:

npm install --save @unocode/polyfills

Usage

import UnoPolyfills from '@unocode/polyfills';

const polyfills = new UnoPolyfills();

polyfills.fix_document_getElementById();
polyfills.fix_window_open();
polyfills.fix_window_show_modal_dialog();

Using original methods after polyfills replaced them

UnoPolyfills save the original methods, so you can easily use them after you replaced them:

import UnoPolyfills from '@unocode/polyfills';

const polyfills = new UnoPolyfills();

// Overrides getElementById() behavior.
polyfills.fix_document_getElementById();

// Runs with new behavior
document.getElementById('my-id');

// Runs original method (without polyfill)
polyfills.replaced.getElementById('my-id');

Package Sidebar

Install

npm i @unocode/polyfills

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

4.39 kB

Total Files

4

Last publish

Collaborators

  • jonathandamiani
  • kazzkiq