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
PerformanceEntryLayoutShift
Properties
| Name | Description |
|---|---|
| HadRecentInput | 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. |
| LastInputTime | Gets the time of the most recent excluding input of the document, or 0 when there was none. |
| Sources | Gets the nodes that contributed the most to the shift (at most 5), sorted in descending order by the area of their impact region. |
| Value | Gets the layout shift value: the impact fraction multiplied by the distance fraction. |
HadRecentInput
LayoutShift.csGets 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.csGets the time of the most recent excluding input of the document, or 0 when there was none.
public double LastInputTime { get; }Property value
See also
Sources
LayoutShift.csGets 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; }Value
LayoutShift.csGets the layout shift value: the impact fraction multiplied by the distance fraction.
public double Value { get; }