Search e01
One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.
6 results across 6 corpora for LayoutShift.
Developer library 6
LayoutShift
Performance API The `LayoutShift` interface of the [Performance API](/docs/Web/API/Performance_API) provides insights into the layout stability of web pages based on movements of the elements on the page. ## Instance properties This interface extends the following PerformanceEntry properties by qualifying them as follows: - PerformanceEntry.duration - : Always returns `0` (the concept of duration does not app
LayoutShift: toJSON() method
Performance API The **`toJSON()`** method of the LayoutShift interface returns a JSON-serializable plain object representing the `LayoutShift` object. The method is automatically called by JSON.stringify() when a `LayoutShift` object is encountered during [JSON](/docs/Glossary/JSON) serialization. ## Syntax ```js-nolint toJSON() ``` ### Parameters None. ### Return value A JSON-serializable plain object contai
LayoutShift: lastInputTime property
Performance API The **`lastInputTime`** read-only property of the LayoutShift interface returns the time of the most recent excluding input or `0` if no excluding input has occurred. Layout shifts are only bad if the user wasn't expecting them. Layout shift metrics like CLS exclude shifts that occurred soon after certain user interactions. These interactions are called _excluding inputs_. Excluding inputs are: - A
LayoutShift: hadRecentInput property
Performance API The **`hadRecentInput`** read-only property of the LayoutShift interface returns `true` if lastInputTime is less than 500 milliseconds in the past. Layout shifts are only a problem if the user is not expecting them, so layout shifts that are the result of user interactions (such as a user expanding a UI element) are often not considered in layout shift metrics. The `hadRecentInput` property allows y
LayoutShift: value property
Performance API The **`value`** read-only property of the LayoutShift interface returns the layout shift score calculated as the impact fraction (fraction of the viewport that was shifted) multiplied by the distance fraction (distance moved as a fraction of viewport). ## Value A number between `0.0` and `1.0` indicating the layout shift score. It is calculated as the impact fraction (fraction of the viewport that
LayoutShift: sources property
Performance API The **`sources`** read-only property of the LayoutShift interface returns an array of LayoutShiftAttribution objects that indicate the DOM elements that moved during the layout shift. ## Value An Array of LayoutShiftAttribution objects. This array will not contain more than five sources. If there are more than five elements impacted by the layout shift, the five most impactful elements are reported