tor-browser

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

BroadcastChannel.webidl (989B)


      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
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
      5 *
      6 * For more information on this interface, please see
      7 * https://html.spec.whatwg.org/#broadcastchannel
      8 */
      9 
     10 [Exposed=(Window,Worker)]
     11 interface BroadcastChannel : EventTarget {
     12  [Throws]
     13  constructor(DOMString channel);
     14 
     15  // This function is for simplifying tests that need to coordinate between
     16  // top-level and third-party documents from the same origin.
     17  // This will throw if called outside of automation.
     18  [ChromeOnly,Throws]
     19  static BroadcastChannel unpartitionedTestingChannel(DOMString channel);
     20 
     21  readonly attribute DOMString name;
     22 
     23  [Throws]
     24  undefined postMessage(any message);
     25 
     26  undefined close();
     27 
     28  attribute EventHandler onmessage;
     29  attribute EventHandler onmessageerror;
     30 };