MCPcopy Index your code
hub / github.com/microsoft/SandDance / commitMount

Function commitMount

docs/external/js/react-dom.development.js:7660–7670  ·  view source on GitHub ↗
(domElement, type, newProps, internalInstanceHandle)

Source from the content-addressed store, hash-verified

7658 var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;
7659 var noTimeout = -1; // -------------------
7660 function commitMount(domElement, type, newProps, internalInstanceHandle) {
7661 // Despite the naming that might imply otherwise, this method only
7662 // fires if there is an `Update` effect scheduled during mounting.
7663 // This happens if `finalizeInitialChildren` returns `true` (which it
7664 // does to implement the `autoFocus` attribute on the client). But
7665 // there are also other cases when this might happen (such as patching
7666 // up text content during hydration mismatch). So we'll check this again.
7667 if (shouldAutoFocusHostComponent(type, newProps)) {
7668 domElement.focus();
7669 }
7670 }
7671 function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
7672 // Update the props handle so that we know which props are the ones with
7673 // with current event handlers.

Callers 1

commitLifeCyclesFunction · 0.85

Calls 2

focusMethod · 0.45

Tested by

no test coverage detected