async disable() {

    // This needs to be done right away to prevent racing conditions in listeners while the inputs
    // are being destroyed.
    if (this.interface) this.interface.onstatechange = undefined;

    return this._destroyInputsAndOutputs().then(() => {

      if (navigator && typeof navigator.close === "function") navigator.close(); // jzz

      this.interface = null; // also resets enabled, sysexEnabled

      /**
       * Event emitted once `WebMidi` has been successfully disabled.
       *
       * @event WebMidi#disabled
       * @type {object}
       * @property {DOMHighResTimeStamp} timestamp The moment when the event occurred (in
       * milliseconds since the navigation start of the document).
       * @property {WebMidi} target The object that triggered the event
       * @property {string} type `"disabled"`
       */
      let event = {
        timestamp: this.time,
        target: this,
        type: "disabled"
      };

      // Finally, trigger the 'disabled' event and then remove all listeners.
      this.emit("disabled", event);
      this.removeListener();

    });

  }
Completely disables **WebMidi.js** by unlinking the MIDI subsystem's interface and closing all
[`Input`](Input) and [`Output`](Output) objects that may have been opened. This also means that
listeners added to [`Input`](Input) objects, [`Output`](Output) objects or to `WebMidi` itself
are also destroyed.

@async
@returns {Promise<Array>}

@throws {Error} The Web MIDI API is not supported by your environment.

@since 2.0.0