For reference:
https://github.com/mozilla/pdf.js/issues/15571#issuecomment-1278141781
const platform = typeof navigator !== "undefined" ? navigator.platform : "";
    return shadow(this, "platform", {
      isWin: platform.includes("Win"),
      isMac: platform.includes("Mac"),
    });
  }
  /**
   * Serialize an event into a string in order to match a
   * potential key for a callback.
   * @param {KeyboardEvent} event
   * @returns {string}
   */
  #serialize(event) {