1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
8 * The PageTransitionEvent interface is used for the pageshow and
9 * pagehide events, which are generic events that apply to both page
10 * load/unload and saving/restoring a document from session history.
14 interface PageTransitionEvent : Event
16 constructor(DOMString type,
17 optional PageTransitionEventInit eventInitDict = {});
20 * Set to true if the document has been or will be persisted across
21 * firing of the event. For example, if a document is being cached in
22 * session history, |persisted| is true for the PageHide event.
24 readonly attribute boolean persisted;
26 // Whether the document is in the middle of a frame swap.
28 readonly attribute boolean inFrameSwap;
31 dictionary PageTransitionEventInit : EventInit
33 boolean persisted = false;
34 boolean inFrameSwap = false;