CLI: Aborting the singleFile html save process from browser script #1086
Unanswered
mayursarojdev
asked this question in
Q&A
Replies: 1 comment
-
This example of code should work. addEventListener("single-file-on-before-capture-request", event => {
if (cancelSave) {
event.preventDefault();
throw new Error("Save cancelled");
}
}); |
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
-
Would really appreciate if you could provide pointers on how passed browser script running in the singleFile browser instance depending upon some conditions it will let the browser continue saving single file html else abort and throw custom error.
In our case we are checking for redirected url and also dom elements and in certain cases we dont need to save the single file.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions