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

Function createInstance

docs/external/js/react-dom.development.js:7596–7617  ·  view source on GitHub ↗
(type, props, rootContainerInstance, hostContext, internalInstanceHandle)

Source from the content-addressed store, hash-verified

7594 selectionInformation = null;
7595 }
7596 function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
7597 var parentNamespace;
7598
7599 {
7600 // TODO: take namespace into account when validating.
7601 var hostContextDev = hostContext;
7602 validateDOMNesting(type, null, hostContextDev.ancestorInfo);
7603
7604 if (typeof props.children === 'string' || typeof props.children === 'number') {
7605 var string = '' + props.children;
7606 var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
7607 validateDOMNesting(null, string, ownAncestorInfo);
7608 }
7609
7610 parentNamespace = hostContextDev.namespace;
7611 }
7612
7613 var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
7614 precacheFiberNode(internalInstanceHandle, domElement);
7615 updateFiberProps(domElement, props);
7616 return domElement;
7617 }
7618 function appendInitialChild(parentInstance, child) {
7619 parentInstance.appendChild(child);
7620 }

Callers 1

completeWorkFunction · 0.85

Calls 5

validateDOMNestingFunction · 0.85
updatedAncestorInfoFunction · 0.85
precacheFiberNodeFunction · 0.85
updateFiberPropsFunction · 0.85
createElementFunction · 0.70

Tested by

no test coverage detected