no-webcomponents

Self-hiding custom element used to display an error if custom elements are not supported.

Usage no npm install needed!

<script type="module">
  import noWebcomponents from 'https://cdn.skypack.dev/no-webcomponents';
</script>

README

no-webcomponents

NPM Version NPM Downloads MIT

Self-hiding custom element used to display an error if custom elements are not supported.

This takes advantage of the fact that legacy browsers treat unknown tags the same as a <div>. This means that without polyfills those browsers will display the contents of <no-webcomponents>. When custom elements and shadow dom v1 are supported it is hidden.

Install

$ npm install no-webcomponents

Usage

See gh-pages (source) for a demo usage of this element.