Firefox Tomorrow

web api interface

PerformanceLongAnimationFrameTiming

View on MDN ↗

Limited availability

The PerformanceLongAnimationFrameTiming interface is specified in the Long Animation Frames API and provides metrics on long animation frames (LoAFs) that occupy rendering and block other tasks from being executed.

Description

Long animation frames (LoAFs) are rendering updates that are delayed beyond 50ms. LoAFs can result in slow user interface (UI) updates, making controls appear unresponsive and causing janky (non-smooth) animated effects and scrolling. This often leads to user frustration.

The PerformanceLongAnimationFrameTiming interface provides the following granular set of information on LoAFs, allowing developers to narrow down their root causes:

  • A detailed set of timestamps for each LoAF.
  • Detailed information on each script that contributed to creating the LoAF, via the scripts property. This returns an array of PerformanceScriptTiming objects, one for each script.

PerformanceLongAnimationFrameTiming inherits from PerformanceEntry.

Instance properties

This interface directly defines the following properties:

It also extends the following PerformanceEntry properties, qualifying and constraining them as described:

  • duration Read only Experimental
    • : Returns a DOMHighResTimeStamp representing the time taken in milliseconds to process the LoAF in its entirety.
  • entryType Read only Experimental
    • : Returns the entry type, which is always "long-animation-frame".
  • name Read only Experimental
    • : Returns the entry name, which is always "long-animation-frame".
  • startTime Read only Experimental

Instance methods

  • toJSON() Experimental
    • : Returns a JSON representation of the PerformanceLongAnimationFrameTiming object.

Examples

See Long animation frame timing for examples related to the Long Animation Frames API.

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also