Disable range request loading for safari.
This commit is contained in:
parent
08e2f7a125
commit
e6dadaadb8
@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals VBArray */
|
||||
/* globals VBArray, PDFJS */
|
||||
|
||||
'use strict';
|
||||
|
||||
@ -438,3 +438,20 @@
|
||||
enumerable: true
|
||||
});
|
||||
})();
|
||||
|
||||
(function checkRangeRequests() {
|
||||
// Safari has issues with cached range requests see:
|
||||
// https://github.com/mozilla/pdf.js/issues/3260
|
||||
// Last tested with version 6.0.4.
|
||||
var isSafari = Object.prototype.toString.call(
|
||||
window.HTMLElement).indexOf('Constructor') > 0;
|
||||
if (!isSafari) {
|
||||
return;
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', function (e) {
|
||||
if (isSafari) {
|
||||
console.warn('Range requests are disabled for safari.');
|
||||
PDFJS.disableRange = true;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
Loading…
x
Reference in New Issue
Block a user