(domElement, type, newProps, internalInstanceHandle)
| 11025 | }); |
| 11026 | } // ------------------- |
| 11027 | function commitMount(domElement, type, newProps, internalInstanceHandle) { |
| 11028 | // Despite the naming that might imply otherwise, this method only |
| 11029 | // fires if there is an `Update` effect scheduled during mounting. |
| 11030 | // This happens if `finalizeInitialChildren` returns `true` (which it |
| 11031 | // does to implement the `autoFocus` attribute on the client). But |
| 11032 | // there are also other cases when this might happen (such as patching |
| 11033 | // up text content during hydration mismatch). So we'll check this again. |
| 11034 | switch (type) { |
| 11035 | case 'button': |
| 11036 | case 'input': |
| 11037 | case 'select': |
| 11038 | case 'textarea': |
| 11039 | if (newProps.autoFocus) { |
| 11040 | domElement.focus(); |
| 11041 | } |
| 11042 | |
| 11043 | return; |
| 11044 | |
| 11045 | case 'img': |
| 11046 | { |
| 11047 | if (newProps.src) { |
| 11048 | domElement.src = newProps.src; |
| 11049 | } |
| 11050 | |
| 11051 | return; |
| 11052 | } |
| 11053 | } |
| 11054 | } |
| 11055 | function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) { |
| 11056 | // Apply the diff to the DOM node. |
| 11057 | updateProperties(domElement, updatePayload, type, oldProps, newProps); // Update the props handle so that we know which props are the ones with |
no outgoing calls
no test coverage detected
searching dependent graphs…