mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
confirm if leaving a modified form without saving
This commit is contained in:
parent
965d20db2a
commit
83365a3756
4 changed files with 94 additions and 6 deletions
|
@ -2536,12 +2536,16 @@ class WorkerTransport {
|
|||
}
|
||||
|
||||
saveDocument(annotationStorage) {
|
||||
return this.messageHandler.sendWithPromise("SaveDocument", {
|
||||
numPages: this._numPages,
|
||||
annotationStorage:
|
||||
(annotationStorage && annotationStorage.getAll()) || null,
|
||||
filename: this._fullReader.filename,
|
||||
});
|
||||
return this.messageHandler
|
||||
.sendWithPromise("SaveDocument", {
|
||||
numPages: this._numPages,
|
||||
annotationStorage:
|
||||
(annotationStorage && annotationStorage.getAll()) || null,
|
||||
filename: this._fullReader.filename,
|
||||
})
|
||||
.finally(() => {
|
||||
annotationStorage.resetModified();
|
||||
});
|
||||
}
|
||||
|
||||
getDestinations() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue