Module

x/evt/lib/index.ts

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

Any HTML element. Some elements directly implement this interface, while others implement it via an interface that inherits it.

Properties

accessKey: string
readonly
accessKeyLabel: string
autocapitalize: string
dir: string
draggable: boolean
hidden: boolean
innerText: string
lang: string
readonly
offsetHeight: number
readonly
offsetLeft: number
readonly
offsetParent: Element | null
readonly
offsetTop: number
readonly
offsetWidth: number
spellcheck: boolean
title: string
translate: boolean

Methods

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