Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

custom-elements-native-shim

defx92ISC1.1.0

A function to shim any built-in element written in, or compiled to, ES5.

readme

custom-elements-native-shim

A function to shim any built-in element written in, or compiled to, ES5.

This shim allows elements written in, or compiled to, ES5 to work on native implementations of Custom Elements v1. It sets new.target to the value of this.constructor so that the native element constructor can access the current under-construction element's definition.

install

> npm install custom-elements-native-shim

use

import shim from "custom-elements-native-shim";
shim("HTMLLIElement");