Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

HTMLImageElement

Provides special properties and methods for manipulating elements.

interface HTMLImageElement extends HTMLElement {
align: string;
alt: string;
border: string;
readonly complete: boolean;
crossOrigin: string | null;
readonly currentSrc: string;
decoding: "async" | "sync" | "auto";
height: number;
hspace: number;
isMap: boolean;
loading: "eager" | "lazy";
longDesc: string;
lowsrc: string;
name: string;
readonly naturalHeight: number;
readonly naturalWidth: number;
referrerPolicy: string;
sizes: string;
src: string;
srcset: string;
useMap: string;
vspace: number;
width: number;
readonly x: number;
readonly y: number;
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;
decode(): Promise<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;
}
var HTMLImageElement: {
prototype: HTMLImageElement;
}
;

§Extends

§Properties

§
align: string
[src]

Sets or retrieves how the object is aligned with adjacent text.

§
alt: string
[src]

Sets or retrieves a text alternative to the graphic.

§
border: string
[src]

Specifies the properties of a border drawn around an object.

§
readonly complete: boolean
[src]

Retrieves whether the object is fully loaded.

§
crossOrigin: string | null
[src]
§
readonly currentSrc: string
[src]
§
decoding: "async" | "sync" | "auto"
[src]
§
height: number
[src]

Sets or retrieves the height of the object.

§
hspace: number
[src]

Sets or retrieves the width of the border to draw around the object.

§
isMap: boolean
[src]

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

§
loading: "eager" | "lazy"
[src]

Sets or retrieves the policy for loading image elements that are outside the viewport.

§
longDesc: string
[src]

Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.

§
lowsrc: string
[src]
§
name: string
[src]

Sets or retrieves the name of the object.

§
readonly naturalHeight: number
[src]

The original height of the image resource before sizing.

§
readonly naturalWidth: number
[src]

The original width of the image resource before sizing.

§
referrerPolicy: string
[src]
§
sizes: string
[src]
§
src: string
[src]

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

§
srcset: string
[src]
§
useMap: string
[src]

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

§
vspace: number
[src]

Sets or retrieves the vertical margin for the object.

§
width: number
[src]

Sets or retrieves the width of the object.

§
readonly x: number
[src]
§
readonly y: number
[src]

§Methods

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