From ca8e78d8b5719edd5af9e366eab65782ef866216 Mon Sep 17 00:00:00 2001 From: William Chong Date: Tue, 23 Apr 2024 01:27:59 +0800 Subject: [PATCH] Add ready postMessage to parent --- web/app.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/app.js b/web/app.js index a0cc5419af369..fb486e4132c49 100644 --- a/web/app.js +++ b/web/app.js @@ -2009,6 +2009,13 @@ const PDFViewerApplication = { window.addEventListener("keydown", webViewerKeyDown); window.addEventListener("keyup", webViewerKeyUp); window.addEventListener("message", webViewerPostMessage); + if (window.parent) { + try { + window.parent.postMessage("ready", "*"); + } catch (ex) { + console.error(ex); + } + } window.addEventListener("resize", _boundEvents.windowResize); window.addEventListener("hashchange", _boundEvents.windowHashChange); window.addEventListener("beforeprint", _boundEvents.windowBeforePrint);