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

Function prepareUpdate

docs/external/js/react-dom.development.js:7625–7637  ·  view source on GitHub ↗
(domElement, type, oldProps, newProps, rootContainerInstance, hostContext)

Source from the content-addressed store, hash-verified

7623 return shouldAutoFocusHostComponent(type, props);
7624 }
7625 function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
7626 {
7627 var hostContextDev = hostContext;
7628
7629 if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {
7630 var string = '' + newProps.children;
7631 var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
7632 validateDOMNesting(null, string, ownAncestorInfo);
7633 }
7634 }
7635
7636 return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance);
7637 }
7638 function shouldSetTextContent(type, props) {
7639 return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
7640 }

Callers 1

Calls 3

updatedAncestorInfoFunction · 0.85
validateDOMNestingFunction · 0.85
diffPropertiesFunction · 0.85

Tested by

no test coverage detected