From: Julian Viereck Date: Tue, 1 Nov 2011 18:56:34 +0000 (+0100) Subject: Merge with master X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=94b8c4656b75683c50ffda90578463590c0269f4;p=pdf.js.git Merge with master --- 94b8c4656b75683c50ffda90578463590c0269f4 diff --cc src/worker.js index d46364f,d62e0c8..74a880c --- a/src/worker.js +++ b/src/worker.js @@@ -44,17 -44,10 +44,17 @@@ MessageHandler.prototype = }; var WorkerProcessorHandler = { - setup: function(handler) { + setup: function wphSetup(handler) { var pdfDoc = null; - handler.on('workerSrc', function(data) { ++ handler.on('workerSrc', function wphSetupWorkerSrc(data) { + // In development, the `workerSrc` message is handled in the + // `worker_loader.js` file. In production the workerProcessHandler is + // called for this. This servers as a dummy to prevent calling an + // undefined action `workerSrc`. + }); + - handler.on('doc', function(data) { + handler.on('doc', function wphSetupDoc(data) { // Create only the model of the PDFDoc, which is enough for // processing the content of the pdf. pdfDoc = new PDFDocModel(new Stream(data)); diff --cc web/viewer.html index 7dd81e0,0c6ab38..60eab8e --- a/web/viewer.html +++ b/web/viewer.html @@@ -3,8 -3,10 +3,10 @@@ Simple pdf.js page viewer + + - ++ - @@@ -24,9 -26,6 +26,8 @@@ + + -