Option to render after timeout #717
timmipetit
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It's currently possible to set a timeout, and an exception will be thrown if the page did not complete within that time. In our case however, we'd rather render the incomplete page to a PDF than throw an exception. In our use case we might have some slow external image, and showing the page without that image would be prefered to not showing anything at all.
From what I can see, this is something that could be handled in the javascript side in
browser.js
. The call topage.goto
will thrown aTimeoutError
if the page is not completed yet after the timeout. This error is caught, and then the process quits. As a quick-and-dirty prototype, we changed the catch handler to this:which gives our desired behaviour. I also understand that this behaviour might not be preferred by everyone. Therefor, I would propose to add an option to continue the rendering if a
TimeoutError
happens.Is this something that you would consider merging if a merge request was made for it?
Beta Was this translation helpful? Give feedback.
All reactions