Archived
Template
1
Fork 0
This repository has been archived on 2024-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
Contour/public/@shoelace-style/shoelace/cdn/utilities/form.d.ts
2024-01-30 10:59:28 -05:00

11 lines
578 B
TypeScript

/**
* Serializes a form and returns a plain object. If a form control with the same name appears more than once, the
* property will be converted to an array.
*/
export declare function serialize(form: HTMLFormElement): Record<string, unknown>;
/**
* Returns all form controls that are associated with the specified form. Includes both native and Shoelace form
* controls. Use this function in lieu of the `HTMLFormElement.elements` property, which doesn't recognize Shoelace
* form controls.
*/
export declare function getFormControls(form: HTMLFormElement): Element[];