0.2.0 • Published 4 months ago

@ryanmorr/is-element-supported v0.2.0

Weekly downloads
1
License
Unlicense
Repository
github
Last release
4 months ago

isElementSupported

Version Badge License Build Status

Feature test HTML element support

Install

Download the CJS, ESM, UMD versions or install via NPM:

npm install @ryanmorr/is-element-supported

Usage

Detect support for an HTML element by providing the tag name:

import isElementSupported from '@ryanmorr/is-element-supported';

// Feature test a known supported element
isElementSupported('div'); //=> true

// Feature test an unsupported element
isElementSupported('foo'); //=> false

Note: SVG and MathML tags are not supported.

License

This project is dedicated to the public domain as described by the Unlicense.