tor-browser

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

MIDIPort.webidl (1087B)


      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 * The origin of this IDL file is
      7 * https://webaudio.github.io/web-midi-api/
      8 */
      9 
     10 enum MIDIPortType {
     11  "input",
     12  "output"
     13 };
     14 
     15 enum MIDIPortDeviceState {
     16  "disconnected",
     17  "connected"
     18 };
     19 
     20 enum MIDIPortConnectionState {
     21  "open",
     22  "closed",
     23  "pending"
     24 };
     25 
     26 [SecureContext, Pref="dom.webmidi.enabled",
     27 Exposed=Window]
     28 interface MIDIPort : EventTarget {
     29  readonly attribute DOMString    id;
     30  readonly attribute DOMString?   manufacturer;
     31  readonly attribute DOMString?   name;
     32  readonly attribute DOMString?   version;
     33  readonly attribute MIDIPortType type;
     34  readonly attribute MIDIPortDeviceState state;
     35  readonly attribute MIDIPortConnectionState connection;
     36           attribute EventHandler onstatechange;
     37  [Throws]
     38  Promise<MIDIPort> open();
     39  [Throws]
     40  Promise<MIDIPort> close();
     41 };