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:
parent
25f6a0c139
commit
b643c0fcfb
6 changed files with 85 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue