Skip to main content
Module

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

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

Properties

currentTime: number | null
effect: AnimationEffect | null
readonly
finished: Promise<Animation>
id: string
oncancel: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null
onfinish: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null
readonly
pending: boolean
readonly
playState: AnimationPlayState
playbackRate: number
readonly
ready: Promise<Animation>
startTime: number | null
timeline: AnimationTimeline | null

Methods

cancel(): void
finish(): void
pause(): void
play(): void
reverse(): void
updatePlaybackRate(playbackRate: number): void
addEventListener<K extends keyof AnimationEventMap>(
type: K,
listener: (this: Animation, ev: AnimationEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof AnimationEventMap>(
type: K,
listener: (this: Animation, ev: AnimationEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void