Skip to main content
Module

x/evt/lib/types/lib.dom.ts>HTMLOptionElement

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

Properties

defaultSelected: boolean

Sets or retrieves the status of an option.

disabled: boolean
readonly
form: HTMLFormElement | null

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

readonly
index: number

Sets or retrieves the ordinal position of an option in a list box.

label: string

Sets or retrieves a value that you can use to implement your own label functionality for the object.

selected: boolean

Sets or retrieves whether the option in the list box is the default item.

text: string

Sets or retrieves the text string specified by the option tag.

value: string

Sets or retrieves the value which is returned to the server when the form control is submitted.

Methods

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