Skip to main content
Module

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

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

Gives access to properties specific to elements. It inherits methods and properties from the base HTMLElement interface.

Properties

readonly
control: HTMLElement | null
readonly
form: HTMLFormElement | null

Retrieves a reference to the form that the object is embedded in.

htmlFor: string

Sets or retrieves the object to which the given label object is assigned.

Methods

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