mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-29 07:37:57 +02:00
Introduces LegacyPromise; polyfills DOM Promise
This commit is contained in:
parent
122cd150d4
commit
5bf3e44e30
20 changed files with 263 additions and 156 deletions
|
@ -80,10 +80,13 @@ describe('api', function() {
|
|||
});
|
||||
});
|
||||
describe('Page', function() {
|
||||
var promise = new Promise();
|
||||
var resolvePromise;
|
||||
var promise = new Promise(function (resolve) {
|
||||
resolvePromise = resolve;
|
||||
});
|
||||
PDFJS.getDocument(basicApiUrl).then(function(doc) {
|
||||
doc.getPage(1).then(function(data) {
|
||||
promise.resolve(data);
|
||||
resolvePromise(data);
|
||||
});
|
||||
});
|
||||
var page;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue