MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / isTextInputElement

Function isTextInputElement

code/controlled-uncontrolled/public/app.js:2983–2995  ·  view source on GitHub ↗
(elem)

Source from the content-addressed store, hash-verified

2981};
2982
2983function isTextInputElement(elem) {
2984 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
2985
2986 if (nodeName === 'input') {
2987 return !!supportedInputTypes[elem.type];
2988 }
2989
2990 if (nodeName === 'textarea') {
2991 return true;
2992 }
2993
2994 return false;
2995}
2996
2997/**
2998 * HTML nodeType values that represent the type of the node

Callers 1

app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected