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

x/evt/lib/types/index.ts>dom.HTMLImageElement

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

Provides special properties and methods for manipulating elements.

Properties

deprecated
align: string
alt: string

Sets or retrieves a text alternative to the graphic.

deprecated
border: string
readonly
complete: boolean

Retrieves whether the object is fully loaded.

crossOrigin: string | null
readonly
currentSrc: string
decoding: "async" | "sync" | "auto"
height: number

Sets or retrieves the height of the object.

deprecated
hspace: number
isMap: boolean

Sets or retrieves whether the image is a server-side image map.

deprecated
longDesc: string
deprecated
lowsrc: string
deprecated
name: string
readonly
naturalHeight: number

The original height of the image resource before sizing.

readonly
naturalWidth: number

The original width of the image resource before sizing.

referrerPolicy: string
sizes: string
src: string

The address or URL of the a media resource that is to be considered.

srcset: string
useMap: string

Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.

deprecated
vspace: number
width: number

Sets or retrieves the width of the object.

readonly
x: number
readonly
y: number

Methods

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