dom/webidl/DataChannel.webidl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 enum RTCDataChannelState {
     6   "connecting",
     7   "open",
     8   "closing",
     9   "closed"
    10 };
    12 enum RTCDataChannelType {
    13   "arraybuffer",
    14   "blob"
    15 };
    17 // XXX This interface is called RTCDataChannel in the spec.
    18 interface DataChannel : EventTarget
    19 {
    20   readonly attribute DOMString label;
    21   readonly attribute boolean reliable;
    22   readonly attribute RTCDataChannelState readyState;
    23   readonly attribute unsigned long bufferedAmount;
    24   attribute EventHandler onopen;
    25   attribute EventHandler onerror;
    26   attribute EventHandler onclose;
    27   void close();
    28   attribute EventHandler onmessage;
    29   attribute RTCDataChannelType binaryType;
    30   [Throws]
    31   void send(DOMString data);
    32   [Throws]
    33   void send(Blob data);
    34   [Throws]
    35   void send(ArrayBuffer data);
    36   [Throws]
    37   void send(ArrayBufferView data);
    38 };
    40 // Mozilla extensions.
    41 partial interface DataChannel
    42 {
    43   readonly attribute DOMString protocol;
    44   readonly attribute boolean ordered;
    45   readonly attribute unsigned short id;
    46   // this is deprecated due to renaming in the spec, but still supported for Fx22
    47   readonly attribute unsigned short stream; // now id
    48 };

mercurial