mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
10 lines
284 B
JavaScript
10 lines
284 B
JavaScript
var regExpInputs = /^(?:input|select|textarea|button)$/i;
|
|
/**
|
|
* Checks if a given element is an input (input, select, textarea or button).
|
|
*
|
|
* @param node the element to check
|
|
*/
|
|
|
|
export default function isInput(node) {
|
|
return node ? regExpInputs.test(node.nodeName) : false;
|
|
} |