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/.
5 *
6 * The nsIDOMCloseEvent interface is the interface to the event
7 * close on a WebSocket object.
8 *
9 * For more information on this interface, please see
10 * http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#closeevent
11 */
12
13[LegacyEventInit,
14 Exposed=(Window,Worker)]
15interface CloseEvent : Event
16{
17  constructor(DOMString type, optional CloseEventInit eventInitDict = {});
18
19  readonly attribute boolean wasClean;
20  readonly attribute unsigned short code;
21  readonly attribute DOMString reason;
22};
23
24dictionary CloseEventInit : EventInit
25{
26  boolean wasClean = false;
27  unsigned short code = 0;
28  DOMString reason = "";
29};
30