1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

Require destinations when they are needed and do not fetch all of them in advance

This commit is contained in:
Tim van der Meij 2014-10-05 15:56:40 +02:00
parent fb6d87c77b
commit b215af30d3
5 changed files with 80 additions and 16 deletions

View file

@ -325,6 +325,12 @@ var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
}
);
handler.on('GetDestination',
function wphSetupGetDestination(data) {
return pdfManager.ensureCatalog('getDestination', [ data.id ]);
}
);
handler.on('GetAttachments',
function wphSetupGetAttachments(data) {
return pdfManager.ensureCatalog('attachments');