Skip to content

An element that displays only when webcomponents are unsupported.

License

Notifications You must be signed in to change notification settings

cfware/no-webcomponents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.