]> git.parisson.com Git - pdf.js.git/commitdiff
Add first API change, not working yet
authorasraniel <wolf@fryx.ch>
Sun, 6 May 2012 19:24:42 +0000 (21:24 +0200)
committerasraniel <wolf@fryx.ch>
Sun, 6 May 2012 19:24:42 +0000 (21:24 +0200)
src/api.js

index bbab680ce1702374aa3c7c8ad4fc77674ddbcdde..b3415c08efd874d8bddd92442af748d6961f629e 100644 (file)
@@ -8,10 +8,10 @@
  * e.g. No cross domain requests without CORS.
  *
  * @param {string|TypedAray} source Either a url to a PDF is located or a
- * typed array already populated with data.
+ * typed array (Uint8Array) already populated with data.
  * @return {Promise} A promise that is resolved with {PDFDocumentProxy} object.
  */
-PDFJS.getDocument = function getDocument(source) {
+PDFJS.getDocument = function getDocument(source, headers) {
   var promise = new PDFJS.Promise();
   var transport = new WorkerTransport(promise);
   if (typeof source === 'string') {
@@ -29,7 +29,8 @@ PDFJS.getDocument = function getDocument(source) {
         error: function getPDFError(e) {
           promise.reject('Unexpected server response of ' +
             e.target.status + '.');
-        }
+        },
+       headers: headers
       },
       function getPDFLoad(data) {
         transport.sendData(data);