1
0
Fork 0
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:
Jonas Jenwald 2023-10-16 16:20:46 +02:00
parent 22d6d95f03
commit 674052d3fc
7 changed files with 17 additions and 18 deletions

View file

@ -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();
});