New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dom-polyfills

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dom-polyfills

DOM polyfills

latest
Source
npmnpm
Version
1.2.2
Version published
Maintainers
1
Created
Source

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

Keywords

DOM

FAQs

Package last updated on 24 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts