onInternal(type, listener) {
    if (Array.isArray(type)) {
      const len = type.length;
      const keys = new Array(len);
      for (let i = 0; i < len; ++i) {
        keys[i] = listen(this, type[i], listener);
      }
      return keys;
    }
    return listen(this, /** @type {string} */ (type), listener);
  }
@param {string|Array<string>} type Type.
@param {function((Event|import("./events/Event").default)): ?} listener Listener.
@return {import("./events.js").EventsKey|Array<import("./events.js").EventsKey>} Event key.
@protected