MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / diffHydratedProperties$1

Function diffHydratedProperties$1

code/new-context-api/public/app.js:15939–16188  ·  view source on GitHub ↗
(domElement, tag, rawProps, parentNamespace, rootContainerElement)

Source from the content-addressed store, hash-verified

15937}
15938
15939function diffHydratedProperties$1(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
15940 var isCustomComponentTag = void 0;
15941 var extraAttributeNames = void 0;
15942
15943 {
15944 suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING$1] === true;
15945 isCustomComponentTag = isCustomComponent(tag, rawProps);
15946 validatePropertiesInDevelopment(tag, rawProps);
15947 if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) {
15948 warning(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerName$2() || 'A component');
15949 didWarnShadyDOM = true;
15950 }
15951 }
15952
15953 // TODO: Make sure that we check isMounted before firing any of these events.
15954 switch (tag) {
15955 case 'iframe':
15956 case 'object':
15957 trapBubbledEvent('topLoad', 'load', domElement);
15958 break;
15959 case 'video':
15960 case 'audio':
15961 // Create listener for each media event
15962 for (var event in mediaEventTypes) {
15963 if (mediaEventTypes.hasOwnProperty(event)) {
15964 trapBubbledEvent(event, mediaEventTypes[event], domElement);
15965 }
15966 }
15967 break;
15968 case 'source':
15969 trapBubbledEvent('topError', 'error', domElement);
15970 break;
15971 case 'img':
15972 case 'image':
15973 case 'link':
15974 trapBubbledEvent('topError', 'error', domElement);
15975 trapBubbledEvent('topLoad', 'load', domElement);
15976 break;
15977 case 'form':
15978 trapBubbledEvent('topReset', 'reset', domElement);
15979 trapBubbledEvent('topSubmit', 'submit', domElement);
15980 break;
15981 case 'details':
15982 trapBubbledEvent('topToggle', 'toggle', domElement);
15983 break;
15984 case 'input':
15985 initWrapperState(domElement, rawProps);
15986 trapBubbledEvent('topInvalid', 'invalid', domElement);
15987 // For controlled components we always need to ensure we're listening
15988 // to onChange. Even if there is no listener.
15989 ensureListeningTo(rootContainerElement, 'onChange');
15990 break;
15991 case 'option':
15992 validateProps(domElement, rawProps);
15993 break;
15994 case 'select':
15995 initWrapperState$1(domElement, rawProps);
15996 trapBubbledEvent('topInvalid', 'invalid', domElement);

Callers

nothing calls this directly

Calls 15

warningFunction · 0.85
isCustomComponentFunction · 0.70
trapBubbledEventFunction · 0.70
initWrapperStateFunction · 0.70
ensureListeningToFunction · 0.70
validatePropsFunction · 0.70
initWrapperState$1Function · 0.70
initWrapperState$2Function · 0.70
assertValidPropsFunction · 0.70
getPropertyInfoFunction · 0.70
getValueForAttributeFunction · 0.70

Tested by

no test coverage detected