element-polyfill

Adds polyfills for Elemnt methods unsupported in older browsers

Usage no npm install needed!

<script type="module">
  import elementPolyfill from 'https://cdn.skypack.dev/element-polyfill';
</script>

README

This package provides polyfills for ParentNode, ChildNode and NodeList methods that are unavailable in older browsers (notably IE 11).

The polyfills are taken from the https://developer.mozilla.org/ pages. The majority are sourced from https://github.com/jserz.

Polyfills

The following methods are polyfilled:

Installation

npm install -S element-polyfill

Usage

Simply require the package somewhere close to the beginning of your code.

// require all polyfills
require('element-polyfill');

// require some polyfills
require('element-polyfill/polyfills/element.child-node.after.js')
require('element-polyfill/polyfills/element.parent-node.append.js')