Table of Contents

Class ContentVisibilityAutoStateChangeEvent

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The ContentVisibilityAutoStateChangeEvent interface is the event object for the Elementcontentvisibilityautostatechange event, which fires on any element with {{cssxref("content-visibility", "content-visibility: auto")}} set on it when it starts or stops being relevant to the user and skipping its contents.

[Value("ContentVisibilityAutoStateChangeEvent")]
public class ContentVisibilityAutoStateChangeEvent : Event
Inheritance
ContentVisibilityAutoStateChangeEvent
Inherited Members

Remarks

While the element is not relevant (between the start and end events), the user agent skips an element's rendering, including layout and painting.
This can significantly improve page rendering speed.
The Elementcontentvisibilityautostatechange event provides a way for an app's code to also start or stop rendering processes (e.g., drawing on a {{htmlelement("canvas")}}) when they are not needed, thereby conserving processing power.

Note that even when hidden from view, element contents will remain semantically relevant (e.g., to assistive technology users), so this signal should not be used to skip significant semantic DOM updates.

-The Elementcontentvisibilityautostatechange event
-CSS Containment
-The content-visibility property
-The contain property

See also on MDN

Constructors

ContentVisibilityAutoStateChangeEvent()

public ContentVisibilityAutoStateChangeEvent()

ContentVisibilityAutoStateChangeEvent(string, ContentVisibilityAutoStateChangeEventInit)

The ContentVisibilityAutoStateChangeEvent() constructor creates a new ContentVisibilityAutoStateChangeEvent object instance.

public ContentVisibilityAutoStateChangeEvent(string type, ContentVisibilityAutoStateChangeEventInit eventInitDict = null)

Parameters

type string
eventInitDict ContentVisibilityAutoStateChangeEventInit

Remarks

-The Elementcontentvisibilityautostatechange event
-CSS Containment
-The content-visibility property
-The contain property

See also on MDN

Properties

Skipped

The skipped read-only property of the ContentVisibilityAutoStateChangeEvent interface returns true if the user agent skips the element's contents, or false otherwise.

[Value("skipped")]
public bool Skipped { get; }

Property Value

bool

A boolean. Returns true if the user agent skips the element's contents, or false otherwise.

Remarks

-The Elementcontentvisibilityautostatechange event
-CSS Containment
-The content-visibility property
-The contain property

See also on MDN