MCPcopy Create free account
hub / github.com/microsoft/SandDance / diffHydratedProperties

Function diffHydratedProperties

docs/external/js/react-dom.development.js:6410–6686  ·  view source on GitHub ↗
(domElement, tag, rawProps, parentNamespace, rootContainerElement)

Source from the content-addressed store, hash-verified

6408 }
6409
6410 function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
6411 var isCustomComponentTag;
6412 var extraAttributeNames;
6413
6414 {
6415 suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;
6416 isCustomComponentTag = isCustomComponent(tag, rawProps);
6417 validatePropertiesInDevelopment(tag, rawProps);
6418 } // TODO: Make sure that we check isMounted before firing any of these events.
6419
6420
6421 switch (tag) {
6422 case 'iframe':
6423 case 'object':
6424 case 'embed':
6425 trapBubbledEvent(TOP_LOAD, domElement);
6426 break;
6427
6428 case 'video':
6429 case 'audio':
6430 // Create listener for each media event
6431 for (var i = 0; i < mediaEventTypes.length; i++) {
6432 trapBubbledEvent(mediaEventTypes[i], domElement);
6433 }
6434
6435 break;
6436
6437 case 'source':
6438 trapBubbledEvent(TOP_ERROR, domElement);
6439 break;
6440
6441 case 'img':
6442 case 'image':
6443 case 'link':
6444 trapBubbledEvent(TOP_ERROR, domElement);
6445 trapBubbledEvent(TOP_LOAD, domElement);
6446 break;
6447
6448 case 'form':
6449 trapBubbledEvent(TOP_RESET, domElement);
6450 trapBubbledEvent(TOP_SUBMIT, domElement);
6451 break;
6452
6453 case 'details':
6454 trapBubbledEvent(TOP_TOGGLE, domElement);
6455 break;
6456
6457 case 'input':
6458 initWrapperState(domElement, rawProps);
6459 trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
6460 // to onChange. Even if there is no listener.
6461
6462 ensureListeningTo(rootContainerElement, 'onChange');
6463 break;
6464
6465 case 'option':
6466 validateProps(domElement, rawProps);
6467 break;

Callers 1

hydrateInstanceFunction · 0.85

Calls 15

isCustomComponentFunction · 0.85
trapBubbledEventFunction · 0.85
initWrapperStateFunction · 0.85
ensureListeningToFunction · 0.85
initWrapperState$1Function · 0.85
initWrapperState$2Function · 0.85
assertValidPropsFunction · 0.85
getPropertyInfoFunction · 0.85
getValueForAttributeFunction · 0.85
shouldIgnoreAttributeFunction · 0.85
shouldRemoveAttributeFunction · 0.85

Tested by

no test coverage detected