mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Require destinations when they are needed and do not fetch all of them in advance
This commit is contained in:
parent
fb6d87c77b
commit
b215af30d3
5 changed files with 80 additions and 16 deletions
|
@ -123,6 +123,13 @@ describe('api', function() {
|
|||
0, 841.89, null] });
|
||||
});
|
||||
});
|
||||
it('gets a destination', function() {
|
||||
var promise = doc.getDestination('chapter1');
|
||||
waitsForPromiseResolved(promise, function(data) {
|
||||
expect(data).toEqual([{ gen: 0, num: 17 }, { name: 'XYZ' },
|
||||
0, 841.89, null]);
|
||||
});
|
||||
});
|
||||
it('gets attachments', function() {
|
||||
var promise = doc.getAttachments();
|
||||
waitsForPromiseResolved(promise, function (data) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue