(domElement, updatePayload, tag, lastRawProps, nextRawProps)
| 16567 | |
| 16568 | // Apply the diff. |
| 16569 | function updateProperties$1(domElement, updatePayload, tag, lastRawProps, nextRawProps) { |
| 16570 | // Update checked *before* name. |
| 16571 | // In the middle of an update, it is possible to have multiple checked. |
| 16572 | // When a checked radio tries to change name, browser makes another radio's checked false. |
| 16573 | if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) { |
| 16574 | updateChecked(domElement, nextRawProps); |
| 16575 | } |
| 16576 | |
| 16577 | var wasCustomComponentTag = isCustomComponent(tag, lastRawProps); |
| 16578 | var isCustomComponentTag = isCustomComponent(tag, nextRawProps); |
| 16579 | // Apply the diff. |
| 16580 | updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); |
| 16581 | |
| 16582 | // TODO: Ensure that an update gets scheduled if any of the special props |
| 16583 | // changed. |
| 16584 | switch (tag) { |
| 16585 | case 'input': |
| 16586 | // Update the wrapper around inputs *after* updating props. This has to |
| 16587 | // happen after `updateDOMProperties`. Otherwise HTML5 input validations |
| 16588 | // raise warnings and prevent the new value from being assigned. |
| 16589 | updateWrapper(domElement, nextRawProps); |
| 16590 | break; |
| 16591 | case 'textarea': |
| 16592 | updateWrapper$1(domElement, nextRawProps); |
| 16593 | break; |
| 16594 | case 'select': |
| 16595 | // <select> value update needs to occur after <option> children |
| 16596 | // reconciliation |
| 16597 | postUpdateWrapper(domElement, nextRawProps); |
| 16598 | break; |
| 16599 | } |
| 16600 | } |
| 16601 | |
| 16602 | function getPossibleStandardName(propName) { |
| 16603 | { |
nothing calls this directly
no test coverage detected