PageRevealEvent: PageRevealEvent() constructor
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The PageRevealEvent() constructor creates a new
PageRevealEvent object instance.
Syntax
js
new PageRevealEvent(type, init)
Parameters
type-
A string representing the type of event. In the case of
PageRevealEventthis is alwayspagereveal. init-
An object containing the following properties:
viewTransitionOptional-
A
ViewTransitionobject representing the active view transition for the related navigation. Defaults tonullif there is no active view transition.
Examples
A developer would not use this constructor manually. A new PageRevealEvent object is constructed when a handler is invoked as a result of the pagereveal event firing.
Specifications
| Specification |
|---|
| HTML> # the-pagerevealevent-interface> |