PageSwapEvent: PageSwapEvent() constructor
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The PageSwapEvent() constructor creates a new
PageSwapEvent object instance.
Syntax
new PageSwapEvent(type, init)
Parameters
type-
A string representing the type of event. In the case of
PageSwapEventthis is alwayspageswap. init-
An object containing the following properties:
activation-
A
NavigationActivationobject representing the navigation type and current and destination document history entries. Defaults tonullif the associated navigation is a cross-origin navigation. viewTransition-
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 PageSwapEvent object is constructed when a handler is invoked as a result of the pageswap event firing.
Specifications
| Specification |
|---|
| HTML> # the-pageswapevent-interface> |
Browser compatibility
Loading…