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

Function updateProperties

docs/external/js/react-dom.development.js:6364–6396  ·  view source on GitHub ↗
(domElement, updatePayload, tag, lastRawProps, nextRawProps)

Source from the content-addressed store, hash-verified

6362 } // Apply the diff.
6363
6364 function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
6365 // Update checked *before* name.
6366 // In the middle of an update, it is possible to have multiple checked.
6367 // When a checked radio tries to change name, browser makes another radio's checked false.
6368 if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
6369 updateChecked(domElement, nextRawProps);
6370 }
6371
6372 var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
6373 var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.
6374
6375 updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props
6376 // changed.
6377
6378 switch (tag) {
6379 case 'input':
6380 // Update the wrapper around inputs *after* updating props. This has to
6381 // happen after `updateDOMProperties`. Otherwise HTML5 input validations
6382 // raise warnings and prevent the new value from being assigned.
6383 updateWrapper(domElement, nextRawProps);
6384 break;
6385
6386 case 'textarea':
6387 updateWrapper$1(domElement, nextRawProps);
6388 break;
6389
6390 case 'select':
6391 // <select> value update needs to occur after <option> children
6392 // reconciliation
6393 postUpdateWrapper(domElement, nextRawProps);
6394 break;
6395 }
6396 }
6397
6398 function getPossibleStandardName(propName) {
6399 {

Callers 1

commitUpdateFunction · 0.85

Calls 6

updateCheckedFunction · 0.85
isCustomComponentFunction · 0.85
updateDOMPropertiesFunction · 0.85
updateWrapperFunction · 0.85
updateWrapper$1Function · 0.85
postUpdateWrapperFunction · 0.85

Tested by

no test coverage detected