mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Make sure WillPrint ran before starting printing
This commit is contained in:
parent
7ae5a0fef7
commit
8439e11160
4 changed files with 58 additions and 20 deletions
|
@ -34,6 +34,7 @@ import { Color } from "./color.js";
|
|||
import { Console } from "./console.js";
|
||||
import { Doc } from "./doc.js";
|
||||
import { ProxyHandler } from "./proxy.js";
|
||||
import { serializeError } from "./app_utils.js";
|
||||
import { Util } from "./util.js";
|
||||
|
||||
function initSandbox(params) {
|
||||
|
@ -214,8 +215,7 @@ function initSandbox(params) {
|
|||
try {
|
||||
functions[name](args);
|
||||
} catch (error) {
|
||||
const value = `${error.toString()}\n${error.stack}`;
|
||||
send({ command: "error", value });
|
||||
send(serializeError(error));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue