Table of Contents

Class PageRevealEvent

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The PageRevealEvent event object is made available inside handler functions for the Window.Pagereveal event.

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

Remarks

During a cross-document navigation, it allows you to manipulate a related view transition (providing access to the relevant ViewTransition object) from the document being navigated to, if a view transition was triggered by the navigation.

Outside view transitions, this event is also useful for cases such as triggering a startup animation, or reporting a page view. It's equivalent to the first Window.RequestAnimationFrame run after a cross-document navigation, if you were to trigger requestAnimationFrame() in the head of the document. For example, if you ran the following reveal() function in the <head>:

-View Transition API

See also on MDN

Constructors

PageRevealEvent()

public PageRevealEvent()

PageRevealEvent(string, PageRevealEventInit)

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

public PageRevealEvent(string type, PageRevealEventInit eventInitDict = null)

Parameters

type string
eventInitDict PageRevealEventInit

Remarks

Properties

ViewTransition

The viewTransition read-only property of the PageRevealEvent interface contains a ViewTransition object representing the active view transition for the cross-document navigation.

[Value("viewTransition")]
public ViewTransition? ViewTransition { get; }

Property Value

ViewTransition

A ViewTransition object, or null if no view transition is active when the event is fired.

Remarks