Skip to content

Checks whether the DOM node passed is of type element

License

Notifications You must be signed in to change notification settings

veeracs/is-dom-element

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-dom-element

Checks whether the DOM node passed is of type element. The module should be used in an environment that has DOM API available.

Dependencies

No dependencies are needed.

Usage

var isDOMElement = require('is-dom-element');

//	Pass a string
if (isDOMElement('my-node')) {
	//	is valid DOM element
}

//	Pass a DOM node
var myNode = document.querySelector('my-node');

if (isDOMElement('my-node')) {
	//	is valid DOM element
}

About

Checks whether the DOM node passed is of type element

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published