Merge pull request #13056 from Snuffleupagus/Doc-WillClose
Dispatch a "Doc/WillClose" event, when scripting is enabled, when closing the document
This commit is contained in:
commit
ba76dd4000
@ -128,6 +128,11 @@ class PDFScriptingManager {
|
||||
this._internalEvents.set("pagesdestroy", async event => {
|
||||
await this._dispatchPageClose(this._pdfViewer.currentPageNumber);
|
||||
|
||||
await this._scripting?.dispatchEventInSandbox({
|
||||
id: "doc",
|
||||
name: "WillClose",
|
||||
});
|
||||
|
||||
this._closeCapability?.resolve();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user