( target: Array<Chunk | PrecomputedChunk>, props: Object, resumableState: ResumableState, renderState: RenderState, formatContext: FormatContext, )
| 2570 | } |
| 2571 | |
| 2572 | function pushStartButton( |
| 2573 | target: Array<Chunk | PrecomputedChunk>, |
| 2574 | props: Object, |
| 2575 | resumableState: ResumableState, |
| 2576 | renderState: RenderState, |
| 2577 | formatContext: FormatContext, |
| 2578 | ): ReactNodeList { |
| 2579 | target.push(startChunkForTag('button')); |
| 2580 | |
| 2581 | let children = null; |
| 2582 | let innerHTML = null; |
| 2583 | let name = null; |
| 2584 | let formAction = null; |
| 2585 | let formEncType = null; |
| 2586 | let formMethod = null; |
| 2587 | let formTarget = null; |
| 2588 | |
| 2589 | for (const propKey in props) { |
| 2590 | if (hasOwnProperty.call(props, propKey)) { |
| 2591 | const propValue = props[propKey]; |
| 2592 | if (propValue == null) { |
| 2593 | continue; |
| 2594 | } |
| 2595 | switch (propKey) { |
| 2596 | case 'children': |
| 2597 | children = propValue; |
| 2598 | break; |
| 2599 | case 'dangerouslySetInnerHTML': |
| 2600 | innerHTML = propValue; |
| 2601 | break; |
| 2602 | case 'name': |
| 2603 | name = propValue; |
| 2604 | break; |
| 2605 | case 'formAction': |
| 2606 | formAction = propValue; |
| 2607 | break; |
| 2608 | case 'formEncType': |
| 2609 | formEncType = propValue; |
| 2610 | break; |
| 2611 | case 'formMethod': |
| 2612 | formMethod = propValue; |
| 2613 | break; |
| 2614 | case 'formTarget': |
| 2615 | formTarget = propValue; |
| 2616 | break; |
| 2617 | default: |
| 2618 | pushAttribute(target, propKey, propValue); |
| 2619 | break; |
| 2620 | } |
| 2621 | } |
| 2622 | } |
| 2623 | |
| 2624 | if (__DEV__) { |
| 2625 | if ( |
| 2626 | formAction !== null && |
| 2627 | props.type != null && |
| 2628 | props.type !== 'submit' && |
| 2629 | !didWarnFormActionType |
no test coverage detected