MCPcopy
hub / github.com/facebook/react / isCheckable

Function isCheckable

packages/react-dom-bindings/src/client/inputValueTracking.js:21–29  ·  view source on GitHub ↗
(elem: HTMLInputElement)

Source from the content-addressed store, hash-verified

19}
20
21function isCheckable(elem: HTMLInputElement) {
22 const type = elem.type;
23 const nodeName = elem.nodeName;
24 return (
25 nodeName &&
26 nodeName.toLowerCase() === 'input' &&
27 (type === 'checkbox' || type === 'radio')
28 );
29}
30
31function getTracker(node: ElementWithValueTracker) {
32 return node._valueTracker;

Callers 3

getValueFromNodeFunction · 0.85
trackFunction · 0.85
trackHydratedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected