Replies: 1 comment
-
This is because it is fired on the parent document: Lines 242 to 253 in 129fc66 So you have to listen for it on the parent document as well. Either move your logic there (however then you can't access objects in the parent.document.addEventListener("webviewerloaded", () => ...) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Attach (recommended) or Link to PDF file
https://doksi.net/en/get.php?lid=40596
Web browser and its version
Firefox 133.0, Edge 131.0
Operating system and its version
Windows 11
PDF.js version
pdfjs-4.8.69-legacy-dist
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
The following events are fired when PDF.js is embedded in the parent page, but not fired when running in an iframe.
document.addEventListener("webviewerloaded", () => {
PDFViewerApplication.initializedPromise.then(() => {
What is the expected behavior?
I want to capture these events to track them in my Analytics software, so these events should be fired. The iframe and the parent page are in the same origin.
What went wrong?
Described above.
Link to a viewer
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions