The PageTransitionEvent() constructor creates a new PageTransitionEvent object, that is used by the pageshow or pagehide events, fired at the window object when a page is loaded or unloaded.
Note: A web developer doesn't typically need to call this constructor, as the browser creates these objects itself when firing pageshow or pagehide events.
new PageTransitionEvent(type, options)typeA string with the name of the event. It is case-sensitive and browsers set it to pageshow or pagehide.
options OptionalAn object that, in addition to the properties defined in Event(), has the following property:
persisted OptionalA boolean indicating if the document is loading from a cache.
A new PageTransitionEvent object.