MCPcopy Create free account
hub / github.com/formkit/formkit / submitForm

Function submitForm

packages/core/src/submitForm.ts:10–18  ·  view source on GitHub ↗
(id: string, root?: ShadowRoot | Document)

Source from the content-addressed store, hash-verified

8 * @public
9 */
10export function submitForm(id: string, root?: ShadowRoot | Document): void {
11 const formElement = (root || document).getElementById(id)
12 if (formElement instanceof HTMLFormElement) {
13 const event = new Event('submit', { cancelable: true, bubbles: true })
14 formElement.dispatchEvent(event)
15 return
16 }
17 warn(151, id)
18}

Callers 1

submitFunction · 0.90

Calls 1

warnFunction · 0.90

Tested by

no test coverage detected