import { type dom } from "https://deno.land/x/evt@v2.4.23/mod.ts";
const { HTMLButtonElement } = dom;
Provides properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating elements.
Properties
Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
Methods
addEventListener<K extends keyof HTMLElementEventMap>(): void
type: K,
listener: (this: HTMLButtonElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof HTMLElementEventMap>(): void
type: K,
listener: (this: HTMLButtonElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | EventListenerOptions,