listenOnce(target, type, listener, options) {
    // Install a shim listener that will stop listening after the first event.
    const shim = (event) => {
      // Stop listening to this event.
      this.unlisten(target, type, shim);
      // Call the original listener.
      listener(event);
    };
    this.listen(target, type, shim, options);
  }
Attaches an event listener to an event target.  The listener will be
removed when the first instance of the event is fired.
@param {EventTarget} target The event target.
@param {string} type The event type.
@param {shaka.util.EventManager.ListenerType} listener The event listener.
@param {(boolean|!AddEventListenerOptions)=} options An object that
   specifies characteristics about the event listener.
   The passive option, if true, indicates that this function will never
   call preventDefault(), which improves scrolling performance.
@export