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

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

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

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