Skip to main content
Module

x/evt/lib/index.ts>dom.HTMLFormElement

💧EventEmitter's typesafe replacement
Go to Latest
interface dom.HTMLFormElement
implements HTMLElement
import { type dom } from "https://deno.land/x/evt@v2.4.13/lib/index.ts";
const { HTMLFormElement } = dom;

A element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements.

Index Signatures

[index: number]: Element
[name: string]: any

Properties

acceptCharset: string

Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.

action: string

Sets or retrieves the URL to which the form content is sent for processing.

autocomplete: string

Specifies whether autocomplete is applied to an editable text field.

readonly
elements: HTMLFormControlsCollection

Retrieves a collection, in source order, of all controls in a given form.

encoding: string

Sets or retrieves the MIME encoding for the form.

enctype: string

Sets or retrieves the encoding type for the form.

readonly
length: number

Sets or retrieves the number of objects in a collection.

method: string

Sets or retrieves how to send the form data to the server.

name: string

Sets or retrieves the name of the object.

noValidate: boolean

Designates a form that is not validated when submitted.

target: string

Sets or retrieves the window or frame at which to target content.

Methods

checkValidity(): boolean

Returns whether a form will validate when it is submitted, without having to submit it.

reportValidity(): boolean
reset(): void

Fires when the user resets a form.

submit(): void

Fires when a FORM is about to be submitted.

addEventListener<K extends keyof HTMLElementEventMap>(
type: K,
listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof HTMLElementEventMap>(
type: K,
listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void