( target: Array<Chunk | PrecomputedChunk>, props: Object, resumableState: ResumableState, renderState: RenderState, formatContext: FormatContext, )
| 2289 | } |
| 2290 | |
| 2291 | function pushStartForm( |
| 2292 | target: Array<Chunk | PrecomputedChunk>, |
| 2293 | props: Object, |
| 2294 | resumableState: ResumableState, |
| 2295 | renderState: RenderState, |
| 2296 | formatContext: FormatContext, |
| 2297 | ): ReactNodeList { |
| 2298 | target.push(startChunkForTag('form')); |
| 2299 | |
| 2300 | let children = null; |
| 2301 | let innerHTML = null; |
| 2302 | let formAction = null; |
| 2303 | let formEncType = null; |
| 2304 | let formMethod = null; |
| 2305 | let formTarget = null; |
| 2306 | |
| 2307 | for (const propKey in props) { |
| 2308 | if (hasOwnProperty.call(props, propKey)) { |
| 2309 | const propValue = props[propKey]; |
| 2310 | if (propValue == null) { |
| 2311 | continue; |
| 2312 | } |
| 2313 | switch (propKey) { |
| 2314 | case 'children': |
| 2315 | children = propValue; |
| 2316 | break; |
| 2317 | case 'dangerouslySetInnerHTML': |
| 2318 | innerHTML = propValue; |
| 2319 | break; |
| 2320 | case 'action': |
| 2321 | formAction = propValue; |
| 2322 | break; |
| 2323 | case 'encType': |
| 2324 | formEncType = propValue; |
| 2325 | break; |
| 2326 | case 'method': |
| 2327 | formMethod = propValue; |
| 2328 | break; |
| 2329 | case 'target': |
| 2330 | formTarget = propValue; |
| 2331 | break; |
| 2332 | default: |
| 2333 | pushAttribute(target, propKey, propValue); |
| 2334 | break; |
| 2335 | } |
| 2336 | } |
| 2337 | } |
| 2338 | |
| 2339 | let formData = null; |
| 2340 | let formActionName = null; |
| 2341 | if (typeof formAction === 'function') { |
| 2342 | // Function form actions cannot control the form properties |
| 2343 | if (__DEV__) { |
| 2344 | if ( |
| 2345 | (formEncType !== null || formMethod !== null) && |
| 2346 | !didWarnFormActionMethod |
| 2347 | ) { |
| 2348 | didWarnFormActionMethod = true; |
no test coverage detected