tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

TCPSocketEvent.webidl (1346B)


      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 /**
      7 * TCPSocketEvent is the event dispatched for all of the events described by TCPSocket,
      8 * except the "error" event. It contains the socket that was associated with the event,
      9 * the type of event, and the data associated with the event if the event is a "data" event.
     10 */
     11 
     12 [Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist",
     13 Exposed=Window]
     14 interface TCPSocketEvent : Event {
     15  constructor(DOMString type, optional TCPSocketEventInit eventInitDict = {});
     16 
     17  /**
     18   * If the event is a "data" event, data will be the bytes read from the network;
     19   * if the binaryType of the socket was "arraybuffer", this value will be of type
     20   * ArrayBuffer, otherwise, it will be a ByteString.
     21   *
     22   * For other events, data will be an empty string.
     23   */
     24  //TODO: make this (ArrayBuffer or ByteString) after sorting out the rooting required. (bug 1121634)
     25  readonly attribute any data;
     26 };
     27 
     28 dictionary TCPSocketEventInit : EventInit {
     29  //TODO: make this (ArrayBuffer or ByteString) after sorting out the rooting required. (bug 1121634)
     30  any data = null;
     31 };