LayoutShiftAttribution Class
A node that shifted in a LayoutShift (https://wicg.github.io/layout-instability/#sec-layout-shift-attribution).
public sealed class LayoutShiftAttributionProperties
| Name | Description |
|---|---|
| CurrentRect | Gets the smallest rectangle that contains the visible part of the node in the current frame, in the coordinates of the viewport (CSS pixels). |
| Node | Gets the node that shifted, or null when it is not connected, when it is in a shadow tree ("get an element") or for a pseudo-element (which is not a node). |
| PreviousRect | Gets the smallest rectangle that contains the visible part of the node in the previous frame, in the coordinates of the viewport (CSS pixels). |
CurrentRect
LayoutShift.csGets the smallest rectangle that contains the visible part of the node in the current frame, in the coordinates of the viewport (CSS pixels).
public DomRectReadOnly CurrentRect { get; }Node
LayoutShift.csGets the node that shifted, or null when it is not connected, when it is in a shadow tree ("get an element") or for a pseudo-element (which is not a node).
public Node? Node { get; }Property value
See also
PreviousRect
LayoutShift.csGets the smallest rectangle that contains the visible part of the node in the previous frame, in the coordinates of the viewport (CSS pixels).
public DomRectReadOnly PreviousRect { get; }