Skip to content

caub/dom-polyfills

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

DOM polyfills

  • fetch
  • URLSearchParams
  • Element#classList
  • Element#dataset
  • Element#matches
  • Element#closest

Must be included after es6-shim (it uses Promises and Map)

usage:

if (!Array.hasOwnProperty('from'))
	addScript('https://unpkg.com/es6-shim@latest/es6-shim.min.js'); // or use your own server
if (!window.hasOwnProperty('URLSearchParams'))
	addScript('https://unpkg.com/dom-polyfills@latest/polyfills.js');


function addScript(src) {
	var script = document.createElement('script');
	script.src = src;
	document.body.appendChild(script);
}

todo tests

About

polyfills for old browsers DOM api, experimental, consider something more robust like polyfill.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published