1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

Use the string value of the field when calling the Format callback (bug 1889122)

This commit is contained in:
Calixte Denizet 2024-04-03 22:24:17 +02:00
parent 25f6a0c139
commit b643c0fcfb
6 changed files with 85 additions and 3 deletions

View file

@ -85,6 +85,16 @@ function closePages(pages) {
);
}
async function waitForSandboxTrip(page) {
const handle = await page.evaluateHandle(() => [
new Promise(resolve => {
window.addEventListener("sandboxtripend", resolve, { once: true });
window.PDFViewerApplication.pdfScriptingManager.sandboxTrip();
}),
]);
await awaitPromise(handle);
}
function waitForTimeout(milliseconds) {
/**
* Wait for the given number of milliseconds.
@ -583,6 +593,7 @@ export {
waitForAnnotationEditorLayer,
waitForEntryInStorage,
waitForEvent,
waitForSandboxTrip,
waitForSelectedEditor,
waitForSerialized,
waitForStorageEntries,