1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 17:48:07 +02:00

[api-minor] Add more general OpenAction support (PR 10334 follow-up, issue 11642)

This patch deprecates the existing `getOpenActionDestination` API method, in favor of a better and more general `getOpenAction` method instead. (For now JavaScript actions, related to printing, are still handled as before.)

By clearly separating "regular" Print actions from the JavaScript handling, it's thus possible to get rid of the somewhat annoying and strictly incorrect warning when the viewer loads.
This commit is contained in:
Jonas Jenwald 2020-02-28 14:54:07 +01:00
parent 25693c6b6d
commit 01fb309a2a
5 changed files with 117 additions and 97 deletions

View file

@ -458,8 +458,8 @@ var WorkerMessageHandler = {
return pdfManager.ensureCatalog("viewerPreferences");
});
handler.on("GetOpenActionDestination", function(data) {
return pdfManager.ensureCatalog("openActionDestination");
handler.on("GetOpenAction", function(data) {
return pdfManager.ensureCatalog("openAction");
});
handler.on("GetAttachments", function wphSetupGetAttachments(data) {