From e4bcbf4fef61d2e98487fd3313796102f1ca2e23 Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sun, 7 Mar 2021 13:51:22 +0100 Subject: [PATCH] Destroyed Required Browser Features (markdown) --- Required-Browser-Features.md | 788 ----------------------------------- 1 file changed, 788 deletions(-) delete mode 100644 Required-Browser-Features.md diff --git a/Required-Browser-Features.md b/Required-Browser-Features.md deleted file mode 100644 index bc1401f..0000000 --- a/Required-Browser-Features.md +++ /dev/null @@ -1,788 +0,0 @@ -This page describes the features that are required for a web browser to have PDF.js function properly. Some of the features are critical and do not let PDF.js function properly if they are not supported or disabled. Some of them can be emulated if absent, however the performance and memory usage of PDF.js will be worse than when the feature is present. - -The required feature tests can be run [here](https://mozilla.github.com/pdf.js/features). - -## CANVAS element is present - -Support of the CANVAS element and 2D context is required feature for PDF.js. -No emulation of the CANVAS element is provided for the browsers that do not support it. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.9)?Yes (v.5)
- -## CANVAS ImageData has set function - -PDF.js will set the canvas backing ImageData object contents. -If the `set` function does not exist, it will be emulated. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Emulated / Yes (v.21)Yes (v.4)Emulated / Yes (v.11)?Yes (v.5)
- -## get-literal properties - -The core library defines object properties using object 'get' literal: - -``` -var obj = { - get prop() { return 1; } -}; -``` - -The browsers that don't understand this syntax will not be able to execute the code. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.9)?Yes (v.5)
- -## addEventListener is present - -The `addEventListener` method is used to bind event listeners for DOM elements. -No emulation of the `addEventListener` method is provided in the browsers that do not support it. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.9)?Yes (v.5)
- -## Typed arrays are present - -The `Uint8Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `Float32Array` and `Float64Array` will be replaced by the artificial TypedArray object if those types are not implemented natively. - -Only `subarray`, `buffer`, `set` and `byteLength` are similated. The `subarray` just clones the array. The `set` method is provided to emulate the `Uint8Array`'s `set` method. The emulated typed arrays are slower, don't truncate the items to specific data types and are memory inefficient. - -If the `Float32Array` native implementation exists and the `Float64Array` is absent, then the `Float32Array` will be used instead of `Float64Array`. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.10)?Yes (v.5.1)
- -## Object.create() is present - -The `Object.create` method will be added to the `Object` function if the native implementation is absent. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.9)?Yes (v.5)
- -## Object.defineProperty() is present - - -The `Object.defineProperty` method will be added to the `Object` function if the native implementation is absent. The `__defineGetter__` / `__defineSetter__` will be used instead. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.9)?Yes (v.5.1)
- -## Object.defineProperty() can be used with DOM objects - -Some browsers do not allow using the `Object.defineProperty` with DOM objects. -In this case, the `Object.defineProperty` is replaced by the artificial one. See [Object.defineProperty() is present](#Object-defineProperty). - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.9)?Yes (v.5.1)
- -## Defined via get-literal properties can be redefined - -Some browsers does not allow redefine properties defined with get literal by the `Object.defineProperty`. -In this case, the `Object.defineProperty` is replaced by the artificial one. See [Object.defineProperty() is present](#Object-defineProperty). - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.9)?Yes (v.5)
- -## Object.keys() is present - -The `Object.keys` method will be added to the `Object` function if the native implementation is absent. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.9)?Yes (v.5)
- -## FileReader is present - -The `FileReader` allows PDF.js read the file data provided in the input[type=file] HTML element. The live PDF.js demo will not be able to read a local file, if the `FileReader` object is not supported. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.10)?Yes (v.6.0)
- -## FileReader.prototype.readAsArrayBuffer() is present - -Older browsers that have no `readAsArrayBuffer` method implementation: the `readAsBinaryString` will be used to emulate its functionality. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.7)Yes (v.10)?Yes (v.6.0)
- -## XMLHttpRequest.prototype.overrideMimeType() is present - -The empty `overrideMimeType` method will be added to the `XMLHttpRequest.prototype`, if the browser does not support it. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Emulated (v.10)?Yes (v.5)
- -## XMLHttpRequest.prototype.response is present - -The `response` getter will be added to the `XMLHttpRequest.prototype`, if the browser does not support it. -This is important for retrieving the binary PDF data using XHR. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
NoYes (v.6)Yes (v.10)?No
- -## btoa() is present - -The `btoa` will be added to the window object, if the browser does not support it. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.10)?Yes (v.5)
- -## Function.prototype.bind is present - -The `bind` method will be added to the `Function.prototype`, if the browser does not support it. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.9)?Yes (v.5)
- -## dataset is present for HTML element - -The `dataset` property will be added to the `HTMLElement.prototype`, if the browser does not support it. -This is important for specifying addition information (e.g. for text selection layer) -attached to specific HTML DOM element. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Emulated (v.10)
- Yes (v.11)
?Yes (v.5.1)
- -## classList is present for HTML element - -The `classList` property will be added to the `HTMLElement.prototype`, if the browser does not support it. -This is important to simplify the viewer implementation. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.10)?Yes (v.5.1)
- -## console object is present - -The `console` object will be added to the window object with empty `log` and `error` methods, -if the browser does not support it. This is important for the output of error messages and diagnostic information. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.9)?Yes (v.5)
- -## console.log is a bind-able function - -The `console.log` and `console.error` functions will be replaced, if the browser does not allow using -the bind method with these functions. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.10)?Yes (v.5)
- -## Function.prototype.apply accepts typed array - -The core code relies on the `Function.prototype.apply` method to accept the typed array as the second argument. -No emulation is provided in browsers that do not support it. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)????
- -## navigator.language is present - -The language getter will be added to the window.navigator object, if the browser does not support it. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Emulated (v.10)
- Yes (v.11)
?Yes (v.5)
- -## evenodd fill rule is supported - -Some PDF content is using "even-odd" fill rule/method. The content will not be displayed -properly (example: [#2351](https://github.com/mozilla/pdf.js/issues/2351)) if this feature is not supported. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
No (v.25)Yes (v.7)No (v.10)?No (v.6.0)
- -## dashed line style is supported - -Some PDF content is using custom dash line styles. The content will not be displayed -properly if this feature is not supported. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.7)No (v.10)?No (v.6.0)
- -## @font-face is supported/enabled - -Most of PDF documents use embedded fonts. If the browser does not support `@font-face` -style rule, the document will not be displayed property. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.9)?Yes (v.5)
- -## @font-face loading completion detection - -The PDF.js shall wait some time before using fonts with CANVAS, -if the browser cannot tell if fonts are loaded and can be used. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Emulated (v.25)Yes (v.14)Yes (v.9)?Yes (v.6)
- -## Worker is supported/enabled - -The PDF.js will execute all code (even long running) on the main thread, -if the browser does not support web workers. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.10)?Yes (v.5)
- -## Worker can receive/send typed arrays - -The PDF.js will execute all code on the main thread, -if the browser cannot send (large) typed arrays to web workers. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.6)Yes (v.10)?Yes (v.6.0)
- - -## Worker can use transfers for postMessage - -Checks if the browser can transfer large chunks of data to the main thread vs cloning typed arrays. See [Using web workers](https://developer.mozilla.org/en-US/docs/Web/Guide/Performance/Using_web_workers#Passing_data_by_transferring_ownership_%28transferable_objects%29) - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.17)Yes (v.18~27)No (v.11)??
- -## XMLHttpRequest supports the response property in web workers - -The PDF.js will execute all code on the main thread, -if the browser cannot request network binary data from web workers. - - - - - - - - - - - - - - - - - - - - -
ChromeFirefox (Gecko)Internet ExplorerOperaSafari
Yes (v.24)Yes (v.10)Yes (v.10)?Yes (v.5.1)