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.

interface Performance {
    eventCounts: EventCounts;
    navigation: PerformanceNavigation;
    onresourcetimingbufferfull: ((this, ev) => any);
    timeOrigin: number;
    timing: PerformanceTiming;
    addEventListener<K>(type, listener, options?): void;
    addEventListener(type, listener, options?): void;
    clearMarks(markName?): void;
    clearMeasures(measureName?): void;
    clearResourceTimings(): void;
    dispatchEvent(event): boolean;
    getEntries(): PerformanceEntryList;
    getEntriesByName(name, type?): PerformanceEntryList;
    getEntriesByType(type): PerformanceEntryList;
    mark(markName, markOptions?): PerformanceMark;
    measure(measureName, startOrMeasureOptions?, endMark?): PerformanceMeasure;
    now(): number;
    removeEventListener<K>(type, listener, options?): void;
    removeEventListener(type, listener, options?): void;
    setResourceTimingBufferSize(maxSize): void;
    toJSON(): any;
}

Hierarchy

  • EventTarget
    • Performance

Properties

eventCounts: EventCounts

Deprecated

onresourcetimingbufferfull: ((this, ev) => any)

Type declaration

    • (this, ev): any
    • Parameters

      Returns any

timeOrigin: number

Deprecated

Methods

  • Type Parameters

    • K extends "resourcetimingbufferfull"

    Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • Optional markName: string

    Returns void

  • Parameters

    • Optional measureName: string

    Returns void

  • Returns void

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    Parameters

    • event: Event

    Returns boolean

  • Parameters

    • name: string
    • Optional type: string

    Returns PerformanceEntryList

  • Parameters

    Returns PerformanceMeasure

  • Returns number

  • Type Parameters

    • K extends "resourcetimingbufferfull"

    Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • maxSize: number

    Returns void

  • Returns any

Generated using TypeDoc