diff --git a/web/firefoxcom.js b/web/firefoxcom.js index b31ea75cc..a411d2723 100644 --- a/web/firefoxcom.js +++ b/web/firefoxcom.js @@ -26,35 +26,6 @@ if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) { } class FirefoxCom { - /** - * Creates an event that the extension is listening for and will - * synchronously respond to. - * NOTE: It is recommended to use requestAsync() instead since one day we may - * not be able to synchronously reply. - * @param {string} action - The action to trigger. - * @param {Object|string} [data] - The data to send. - * @returns {*} The response. - */ - static requestSync(action, data) { - const request = document.createTextNode(""); - document.documentElement.append(request); - - const sender = new CustomEvent("pdf.js.message", { - bubbles: true, - cancelable: false, - detail: { - action, - data, - sync: true, - }, - }); - request.dispatchEvent(sender); - const response = sender.detail.response; - request.remove(); - - return response; - } - /** * Creates an event that the extension is listening for and will * asynchronously respond to. @@ -96,7 +67,6 @@ class FirefoxCom { detail: { action, data, - sync: false, responseExpected: !!callback, }, });