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

Function diffHydratedProperties$1

code/composition/public/app.js:16716–16965  ·  view source on GitHub ↗
(domElement, tag, rawProps, parentNamespace, rootContainerElement)

Source from the content-addressed store, hash-verified

16714}
16715
16716function diffHydratedProperties$1(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
16717 var isCustomComponentTag = void 0;
16718 var extraAttributeNames = void 0;
16719
16720 {
16721 suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING$1] === true;
16722 isCustomComponentTag = isCustomComponent(tag, rawProps);
16723 validatePropertiesInDevelopment(tag, rawProps);
16724 if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) {
16725 warning(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerName$2() || 'A component');
16726 didWarnShadyDOM = true;
16727 }
16728 }
16729
16730 // TODO: Make sure that we check isMounted before firing any of these events.
16731 switch (tag) {
16732 case 'iframe':
16733 case 'object':
16734 trapBubbledEvent('topLoad', 'load', domElement);
16735 break;
16736 case 'video':
16737 case 'audio':
16738 // Create listener for each media event
16739 for (var event in mediaEventTypes) {
16740 if (mediaEventTypes.hasOwnProperty(event)) {
16741 trapBubbledEvent(event, mediaEventTypes[event], domElement);
16742 }
16743 }
16744 break;
16745 case 'source':
16746 trapBubbledEvent('topError', 'error', domElement);
16747 break;
16748 case 'img':
16749 case 'image':
16750 case 'link':
16751 trapBubbledEvent('topError', 'error', domElement);
16752 trapBubbledEvent('topLoad', 'load', domElement);
16753 break;
16754 case 'form':
16755 trapBubbledEvent('topReset', 'reset', domElement);
16756 trapBubbledEvent('topSubmit', 'submit', domElement);
16757 break;
16758 case 'details':
16759 trapBubbledEvent('topToggle', 'toggle', domElement);
16760 break;
16761 case 'input':
16762 initWrapperState(domElement, rawProps);
16763 trapBubbledEvent('topInvalid', 'invalid', domElement);
16764 // For controlled components we always need to ensure we're listening
16765 // to onChange. Even if there is no listener.
16766 ensureListeningTo(rootContainerElement, 'onChange');
16767 break;
16768 case 'option':
16769 validateProps(domElement, rawProps);
16770 break;
16771 case 'select':
16772 initWrapperState$1(domElement, rawProps);
16773 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