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

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

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

Provides special properties (beyond the regular HTMLElement object interface it also has available to it by inheritance) for manipulating elements.

Properties

media: string

Gets or sets the intended media type of the media source.

sizes: string
src: string

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

srcset: string
type: string

Gets or sets the MIME type of a media resource.

Methods

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