Class PageSwapEvent
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The PageSwapEvent event object is made available inside handler functions for the Window.Pageswap event.
[Value("PageSwapEvent")]
public class PageSwapEvent : Event
- Inheritance
-
PageSwapEvent
- Inherited Members
Remarks
The pageswap event is fired when you navigate across documents, when the previous document is about to unload. During a cross-document navigation, the PageSwapEvent event object allows you to manipulate the related view transition (providing access to the relevant ViewTransition object) from the document being navigated from, if a view transition was triggered by the navigation. It also provides access to information on the navigation type and current and destination documents.
Constructors
PageSwapEvent()
public PageSwapEvent()
PageSwapEvent(string, PageSwapEventInit)
The PageSwapEvent() constructor creates a new
PageSwapEvent object instance.
public PageSwapEvent(string type, PageSwapEventInit eventInitDict = null)
Parameters
typestringeventInitDictPageSwapEventInit
Remarks
Properties
Activation
The activation read-only property of the PageSwapEvent interface contains a NavigationActivation object containing the navigation type and current and destination document history entries for a same-origin navigation.
[Value("activation")]
public NavigationActivation? Activation { get; }
Property Value
- NavigationActivation
A NavigationActivation object, or
nullif the associated navigation has a cross-origin URL anywhere in the redirect chain.
Remarks
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
nullif no view transition is active when the event is fired.