static request(action, data, callback = null) {
    const request = document.createTextNode("");
    if (callback) {
      request.addEventListener(
        "pdf.js.response",
        event => {
          const response = event.detail.response;
          event.target.remove();

          callback(response);
        },
        { once: true }
      );
    }
    document.documentElement.append(request);

    const sender = new CustomEvent("pdf.js.message", {
      bubbles: true,
      cancelable: false,
      detail: {
        action,
        data,
        responseExpected: !!callback,
      },
    });
    request.dispatchEvent(sender);
  }
Creates an event that the extension is listening for and will, optionally,
asynchronously respond to.
@param {string} action - The action to trigger.
@param {Object|string} [data] - The data to send.