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