-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Catch Load Errors #14451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
That's actually somewhat expected, since the Lines 262 to 295 in e003281
No such thing exists, or has ever existed, since the use-case does seem somewhat specialized. (Perhaps we could add a new "documenterror" event, but please note that neither of this really applies to the Firefox PDF viewer.)
Are you already modifying the viewer source-code by e.g. extending the Lines 2136 to 2139 in e003281
|
I can fire the custom event suggested. Thanks. |
When using viewer.js code in an iframe (
web/viewer.html?file=my.pdf"
) and getting a load error likeError: file origin does not match viewer's
how do I catch this error? The console reportsapp.js:2140 Uncaught (in promise) Error: file origin does not match viewer's
. I have setup the load listener and am using thePDFViewerApplication.initializedPromise
. I was hoping thePDFViewerApplication.initializedPromise
would reject, but it does not. I could not find an eventbus event to listen to specifically for load errors either.I would like to programmatically detect such load errors and dynamically remove the iframe hosting the pdf viewer and instead replace it with my own error messaging. I can't figure out how to do that.
Configuration:
Steps to reproduce the problem:
app.js:2140 Uncaught (in promise) Error: file origin does not match viewer's
error.The text was updated successfully, but these errors were encountered: