Merge pull request #3315 from brendandahl/disable-range-safari
Disable range request loading for safari.
This commit is contained in:
commit
2dc062e183
@ -14,7 +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 VBArray */
|
/* globals VBArray, PDFJS */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@ -438,3 +438,20 @@
|
|||||||
enumerable: true
|
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