MCPcopy Create free account
hub / github.com/microsoft/SandDance / shouldUseClickEvent

Function shouldUseClickEvent

docs/external/js/react-dom.development.js:9350–9356  ·  view source on GitHub ↗

* SECTION: handle `click` event

(elem)

Source from the content-addressed store, hash-verified

9348
9349
9350 function shouldUseClickEvent(elem) {
9351 // Use the `click` event to detect changes to checkbox and radio inputs.
9352 // This approach works across all browsers, whereas `change` does not fire
9353 // until `blur` in IE8.
9354 var nodeName = elem.nodeName;
9355 return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
9356 }
9357
9358 function getTargetInstForClickEvent(topLevelType, targetInst) {
9359 if (topLevelType === TOP_CLICK) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected