2010-06-17 11:36:01 -07:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2010-06-17 11:36:01 -07:00
|
|
|
|
|
|
|
#include "nsIDOMEvent.idl"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The nsIDOMCloseEvent interface is the interface to the event
|
|
|
|
* close on a WebSocket object.
|
|
|
|
*
|
|
|
|
* For more information on this interface, please see
|
|
|
|
* http://dev.w3.org/html5/websockets/#closeevent
|
|
|
|
*/
|
2012-12-22 00:18:08 -08:00
|
|
|
[scriptable, builtinclass, uuid(0b85dc61-2436-4786-b153-097f5c3a33b6)]
|
2010-06-17 11:36:01 -07:00
|
|
|
interface nsIDOMCloseEvent : nsIDOMEvent
|
|
|
|
{
|
|
|
|
readonly attribute boolean wasClean;
|
2011-08-03 12:15:25 -07:00
|
|
|
readonly attribute unsigned short code;
|
|
|
|
readonly attribute DOMString reason;
|
|
|
|
|
2010-06-17 11:36:01 -07:00
|
|
|
void initCloseEvent(in DOMString aType,
|
2011-08-03 12:15:25 -07:00
|
|
|
in boolean aCanBubble,
|
|
|
|
in boolean aCancelable,
|
|
|
|
in boolean aWasClean,
|
|
|
|
in unsigned short aReasonCode,
|
|
|
|
in DOMString aReason);
|
2010-06-17 11:36:01 -07:00
|
|
|
};
|
2011-12-14 11:55:32 -08:00
|
|
|
|
2012-03-12 21:44:48 -07:00
|
|
|
dictionary CloseEventInit : EventInit
|
2011-12-14 11:55:32 -08:00
|
|
|
{
|
2012-03-12 21:44:48 -07:00
|
|
|
boolean wasClean;
|
|
|
|
unsigned short code;
|
|
|
|
DOMString reason;
|
2011-12-14 11:55:32 -08:00
|
|
|
};
|