Add the possibility to collect Javascript actions

This commit is contained in:
Calixte Denizet 2020-09-30 20:58:45 +02:00
parent fd1d9cc85f
commit 71ecc3129b
7 changed files with 383 additions and 3 deletions

View file

@ -876,6 +876,14 @@ class PDFDocumentProxy {
saveDocument(annotationStorage) {
return this._transport.saveDocument(annotationStorage);
}
/**
* @returns {Promise<Array<Object>>} A promise that is resolved with an
* {Array<Object>} containing field data for the JS sandbox.
*/
getFieldObjects() {
return this._transport.getFieldObjects();
}
}
/**
@ -2549,6 +2557,10 @@ class WorkerTransport {
});
}
getFieldObjects() {
return this.messageHandler.sendWithPromise("GetFieldObjects", null);
}
getDestinations() {
return this.messageHandler.sendWithPromise("GetDestinations", null);
}