Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

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

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