1
0
Fork 0
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:
Yury Delendik 2014-01-03 18:17:05 -06:00
parent 122cd150d4
commit 5bf3e44e30
20 changed files with 263 additions and 156 deletions

View file

@ -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;