Put URL = URL || webkitURL in compatibility.js
Declares the URL variable globally. If the feature is not supported, the variable will still be declared, but have the "undefined" value. Supported by: - Firefox 4 Firefox 21 in Web worker - Chrome 8 (prefixed as webkitURL), 23+ unprefixed Chrome 10 (prefixed as webkitURL) in Web Worker, 23+ unprefixed - Opera 15 Opera 15 in Web Worker - Internet Explorer 10 Internet Explorer 11 in Web Worker - Safari 6 (prefixed as webkitURL) Safari 6 (prefixed as webkitURL) in Web Worker
This commit is contained in:
		
							parent
							
								
									4ffc408512
								
							
						
					
					
						commit
						69a64d45bc
					
				@ -92,6 +92,13 @@ if (typeof PDFJS === 'undefined') {
 | 
				
			|||||||
  window.Float64Array = TypedArray;
 | 
					  window.Float64Array = TypedArray;
 | 
				
			||||||
})();
 | 
					})();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// URL = URL || webkitURL
 | 
				
			||||||
 | 
					(function normalizeURLObject() {
 | 
				
			||||||
 | 
					  if (!window.URL && window.webkitURL) {
 | 
				
			||||||
 | 
					    window.URL = window.webkitURL;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					})();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Object.create() ?
 | 
					// Object.create() ?
 | 
				
			||||||
(function checkObjectCreateCompatibility() {
 | 
					(function checkObjectCreateCompatibility() {
 | 
				
			||||||
  if (typeof Object.create !== 'undefined')
 | 
					  if (typeof Object.create !== 'undefined')
 | 
				
			||||||
 | 
				
			|||||||
@ -14,6 +14,7 @@
 | 
				
			|||||||
 * See the License for the specific language governing permissions and
 | 
					 * See the License for the specific language governing permissions and
 | 
				
			||||||
 * limitations under the License.
 | 
					 * limitations under the License.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					/* globals URL*/
 | 
				
			||||||
/* globals PDFJS, PDFBug, FirefoxCom, Stats, Cache, PDFFindBar */
 | 
					/* globals PDFJS, PDFBug, FirefoxCom, Stats, Cache, PDFFindBar */
 | 
				
			||||||
/* globals PDFFindController, ProgressBar, getFileName, CustomStyle */
 | 
					/* globals PDFFindController, ProgressBar, getFileName, CustomStyle */
 | 
				
			||||||
/* globals getOutputScale, TextLayerBuilder */
 | 
					/* globals getOutputScale, TextLayerBuilder */
 | 
				
			||||||
@ -975,8 +976,7 @@ var PDFView = {
 | 
				
			|||||||
//      );
 | 
					//      );
 | 
				
			||||||
//  }
 | 
					//  }
 | 
				
			||||||
//#endif
 | 
					//#endif
 | 
				
			||||||
    var URL = window.URL || window.webkitURL;
 | 
					    // If the PDF is not ready yet, or if URL.createObjectURL is not supported,
 | 
				
			||||||
    // If the PDF is not ready yet, or if createObjectURL is not supported,
 | 
					 | 
				
			||||||
    // just try to download with the url.
 | 
					    // just try to download with the url.
 | 
				
			||||||
    if (!this.pdfDocument || !URL) {
 | 
					    if (!this.pdfDocument || !URL) {
 | 
				
			||||||
        noData();
 | 
					        noData();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user