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 May 21, 2024
1 parent bc5b4f0 commit 06f24df
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 @@ -2012,6 +2012,13 @@ const PDFViewerApplication = {
window.addEventListener("keydown", webViewerKeyDown, { signal });
window.addEventListener("keyup", webViewerKeyUp, { signal });
window.addEventListener("message", webViewerPostMessage);
if (window.parent) {
try {
window.parent.postMessage("ready", "*");
} catch (ex) {
console.error(ex);
}
}
window.addEventListener(
"resize",
() => {
Expand Down

0 comments on commit 06f24df

Please sign in to comment.