HTML DOM
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.
- : A string representing the type of event. In the case of
init- : An object containing the following properties:
activation- : A NavigationActivation object representing the navigation type and current and destination document history entries. Defaults to
nullif the associated navigation is a cross-origin navigation.
- : A NavigationActivation object representing the navigation type and current and destination document history entries. Defaults to
viewTransition- : A ViewTransition object representing the active view transition for the related navigation. Defaults to
nullif there is no active view transition.
- : A ViewTransition object representing the active view transition for the related navigation. Defaults to
- : An object containing the following properties:
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 Window.pageswap_event event firing.
Specifications
Browser compatibility
See also
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
