Coder Social home page Coder Social logo

custom-elements's Introduction

Custom Elements Polyfill

This module provides the Custom Elements V1 API as defined by standards, including the ability to extend builtin elements, all in ~2K minified and gzipped / brotlied.

Compatibility

The polyfill gracefully enhances the following minimum versions of at least these browsers, up to their latest version:

  • Chrome 38
  • Firefox 14
  • Opera 25
  • Internet Explorer 11 and Edge 12
  • Safari 8 and WebKit based
  • Samsung Internet 3

How To

Either install this module via npm i @ungap/custom-elements, and include it in your project, or use a CDN such as unpkg.com to obtain the minified version of this module.

<!-- this should be on top of your HTML <head> scripts -->
<script src="//unpkg.com/@ungap/custom-elements"></script>

If targeted browsers are ES2015 compatible, the es.js file would provide the same polyfill, just lighter, as no transpilation is used.

<script src="//unpkg.com/@ungap/custom-elements/es.js"></script>

If installed as module, please remember to include it on top of your main JS file.

// ESM
import '@ungap/custom-elements';

// CJS
require('@ungap/custom-elements');

The module will incrementally patch the global window/self reference, adding a customElements object that is compatible with the API.

Source Code

This module simply provides @webreflection/custom-elements module under the ungap umbrella.

custom-elements's People

Contributors

webreflection avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.