Skip to main content
Module

x/evt/mod.ts>dom.Performance

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

Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API.

Properties

readonly
deprecated
navigation: PerformanceNavigation
onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null
readonly
timeOrigin: number
readonly
deprecated
timing: PerformanceTiming

Methods

clearMarks(markName?: string): void
clearMeasures(measureName?: string): void
clearResourceTimings(): void
getEntries(): PerformanceEntryList
getEntriesByName(name: string, type?: string): PerformanceEntryList
getEntriesByType(type: string): PerformanceEntryList
mark(markName: string): void
measure(
measureName: string,
startMark?: string,
endMark?: string,
): void
now(): number
setResourceTimingBufferSize(maxSize: number): void
toJSON(): any
addEventListener<K extends keyof PerformanceEventMap>(
type: K,
listener: (this: Performance, ev: PerformanceEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof PerformanceEventMap>(
type: K,
listener: (this: Performance, ev: PerformanceEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void