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,
listener: EventListenerOrEventListenerObject,
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,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;var HTMLImageElement: {
prototype: HTMLImageElement;
new (): HTMLImageElement;
};§Extends
§Properties
§
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.
§Methods
§
addEventListener<K extends keyof HTMLElementEventMap>(
[src]type: K,
listener: (this: HTMLImageElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void§
addEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void§
removeEventListener<K extends keyof HTMLElementEventMap>(
[src]type: K,
listener: (this: HTMLImageElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void§
removeEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void