mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Re-factor the blob-URL caching in DownloadManager.openOrDownloadData
Cache blob-URLs on the actual data, rather than DOM elements, to reduce potential duplicates (note the updated unit-test).
This commit is contained in:
parent
22d6d95f03
commit
674052d3fc
7 changed files with 17 additions and 18 deletions
|
@ -2883,6 +2883,11 @@ describe("api", function () {
|
|||
|
||||
expect(attachmentDest).toEqual('[0,{"name":"Fit"}]');
|
||||
|
||||
// Check that the attachments, which are identical, aren't duplicated.
|
||||
for (let i = 1, ii = annotations.length; i < ii; i++) {
|
||||
expect(annotations[i].attachment).toBe(attachment);
|
||||
}
|
||||
|
||||
await loadingTask.destroy();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue