MCPcopy
hub / github.com/vercel/next.js / hasReactClientActionAttributes

Function hasReactClientActionAttributes

packages/next/src/client/form-shared.tsx:175–180  ·  view source on GitHub ↗
(submitter: HTMLElement)

Source from the content-addressed store, hash-verified

173}
174
175export function hasReactClientActionAttributes(submitter: HTMLElement) {
176 // CSR: https://github.com/facebook/react/blob/942eb80381b96f8410eab1bef1c539bed1ab0eb1/packages/react-dom-bindings/src/client/ReactDOMComponent.js#L482-L487
177 // SSR: https://github.com/facebook/react/blob/942eb80381b96f8410eab1bef1c539bed1ab0eb1/packages/react-dom-bindings/src/client/ReactDOMComponent.js#L2401
178 const action = submitter.getAttribute('formAction')
179 return action && /\s*javascript:/i.test(action)
180}

Callers 2

onFormSubmitFunction · 0.90
onFormSubmitFunction · 0.90

Calls 2

getAttributeMethod · 0.80
testMethod · 0.65

Tested by

no test coverage detected