1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

'use strict' everywhere

This commit is contained in:
Artur Adib 2011-10-25 18:18:22 -07:00
parent 0aae9ef880
commit e71b6188c6
20 changed files with 79 additions and 9 deletions

View file

@ -1,16 +1,19 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict';
var globalScope = (typeof window === 'undefined') ? this : window;
var ERRORS = 0, WARNINGS = 1, TODOS = 5;
var verbosity = WARNINGS;
var useWorker = false;
// The global PDF object exposes the API
// In production, it will be declared outside a global wrapper
// In development, it will be declared here
if (typeof PDF === 'undefined') {
PDF = {};
if (!globalScope.PDF) {
globalScope.PDF = {};
}
// getPdf()
@ -46,7 +49,7 @@ function getPdf(arg, callback) {
};
xhr.send(null);
}
PDF.getPdf = getPdf;
globalScope.PDF.getPdf = getPdf;
var Page = (function pagePage() {
function constructor(xref, pageNumber, pageDict, ref) {
@ -605,4 +608,4 @@ var PDFDoc = (function() {
return constructor;
})();
PDF.PDFDoc = PDFDoc;
globalScope.PDF.PDFDoc = PDFDoc;