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/.
6 * The origin of this IDL file is
7 * https://w3c.github.io/presentation-api/#interface-presentationconnectioncloseevent
10 enum PresentationConnectionClosedReason
12 // The communication encountered an unrecoverable error.
15 // |PresentationConnection.close()| is called by controlling browsing context
16 // or the receiving browsing context.
19 // The connection is closed because the destination browsing context
20 // that owned the connection navigated or was discarded.
24 [Constructor(DOMString type,
25 PresentationConnectionCloseEventInit eventInitDict),
26 Pref="dom.presentation.enabled"]
27 interface PresentationConnectionCloseEvent : Event
29 readonly attribute PresentationConnectionClosedReason reason;
31 // The message is a human readable description of
32 // how the communication channel encountered an error.
33 // It is empty when the closed reason is closed or wentaway.
34 readonly attribute DOMString message;
37 dictionary PresentationConnectionCloseEventInit : EventInit
39 required PresentationConnectionClosedReason reason;
40 DOMString message = "";