dom/webidl/CloseEvent.webidl
author Butkovits Atila <abutkovits@mozilla.com>
Thu, 04 Jun 2020 15:41:14 +0300
changeset 533887 0d21bdf3fc0118b553c6543ddbff927a2c70cb96
parent 492911 422b7beedf7cafda2c392f88ac8d234ca24ca853
permissions -rw-r--r--
Backed out changeset a900282391e1 (bug 1641751) for causing bugs 1643310, 1643238, 1643240. CLOSED TREE

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * The nsIDOMCloseEvent interface is the interface to the event
 * close on a WebSocket object.
 *
 * For more information on this interface, please see
 * http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#closeevent
 */

[LegacyEventInit,
 Exposed=(Window,Worker)]
interface CloseEvent : Event
{
  constructor(DOMString type, optional CloseEventInit eventInitDict = {});

  readonly attribute boolean wasClean;
  readonly attribute unsigned short code;
  readonly attribute DOMString reason;
};

dictionary CloseEventInit : EventInit
{
  boolean wasClean = false;
  unsigned short code = 0;
  DOMString reason = "";
};