LayoutShift Class

A layout shift of a document (https://wicg.github.io/layout-instability/#sec-layout-shift): the score of the movement of the visible boxes between two rendering updates, reported to the layout-shift performance observers of its window (see Document.ReportTheLayoutShift).

public sealed class LayoutShift : PerformanceEntry
Inheritance
PerformanceEntry LayoutShift

Properties

NameDescription
HadRecentInputGets whether an excluding input (e.g. a press of a mouse button or of a key) occurred less than 500 milliseconds before the shift.
LastInputTimeGets the time of the most recent excluding input of the document, or 0 when there was none.
SourcesGets the nodes that contributed the most to the shift (at most 5), sorted in descending order by the area of their impact region.
ValueGets the layout shift value: the impact fraction multiplied by the distance fraction.

HadRecentInput

LayoutShift.cs

Gets whether an excluding input (e.g. a press of a mouse button or of a key) occurred less than 500 milliseconds before the shift.

public bool HadRecentInput { get; }

LastInputTime

LayoutShift.cs

Gets the time of the most recent excluding input of the document, or 0 when there was none.

public double LastInputTime { get; }

Gets the nodes that contributed the most to the shift (at most 5), sorted in descending order by the area of their impact region.

public IReadOnlyList<LayoutShiftAttribution> Sources { get; }

Gets the layout shift value: the impact fraction multiplied by the distance fraction.

public double Value { get; }