Skip to content

Commit

Permalink
Add ready postMessage to parent
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Apr 22, 2024
1 parent 2e0e9ba commit ca8e78d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ca8e78d

Please sign in to comment.