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 PageRevealEvent this is always pagereveal.

init

An object containing the following properties:

viewTransition Optional

A ViewTransition object representing the active view transition for the related navigation. Defaults to null if 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

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
PageRevealEvent() constructor
Chrome – Full support
Chrome 128 (Release date: 2024-08-20)
footnote Full support
Edge – Full support
Edge 128 (Release date: 2024-08-22)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 114 (Release date: 2024-09-25)
footnote Full support
Safari – Full support
Safari 18.2 (Release date: 2024-12-11)
footnote Full support
Chrome Android – Full support
Chrome Android 128 (Release date: 2024-08-20)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 85 (Release date: 2024-10-29)
footnote Full support
Safari on iOS – Full support
Safari on iOS 18.2 (Release date: 2024-12-11)
footnote Full support
Samsung Internet – Full support
Samsung Internet 28 (Release date: 2025-04-02)
footnote Full support
WebView Android – Full support
WebView Android 128 (Release date: 2024-08-20)
footnote Full support
WebView on iOS – Full support
WebView on iOS 18.2 (Release date: 2024-12-11)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support

See also