MCPcopy Create free account
hub / github.com/microsoft/SandDance / postMountWrapper$3

Function postMountWrapper$3

docs/external/js/react-dom.development.js:2559–2573  ·  view source on GitHub ↗
(element, props)

Source from the content-addressed store, hash-verified

2557 }
2558 }
2559 function postMountWrapper$3(element, props) {
2560 var node = element; // This is in postMount because we need access to the DOM node, which is not
2561 // available until after the component has mounted.
2562
2563 var textContent = node.textContent; // Only set node.value if textContent is equal to the expected
2564 // initial value. In IE10/IE11 there is a bug where the placeholder attribute
2565 // will populate textContent as well.
2566 // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
2567
2568 if (textContent === node._wrapperState.initialValue) {
2569 if (textContent !== '' && textContent !== null) {
2570 node.value = textContent;
2571 }
2572 }
2573 }
2574 function restoreControlledState$2(element, props) {
2575 // DOM component is still mounted; update
2576 updateWrapper$1(element, props);

Callers 2

setInitialPropertiesFunction · 0.85
diffHydratedPropertiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected