1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-29 07:37:57 +02:00

Check if the browser supports manipulation of the history

This commit is contained in:
Jonas 2013-06-24 20:46:13 +02:00
parent cce3e9cd1b
commit 5c93ec3a2c
2 changed files with 13 additions and 3 deletions

View file

@ -391,7 +391,7 @@ if (typeof PDFJS === 'undefined') {
});
})();
// Check console compatability
// Check console compatibility
(function checkConsoleCompatibility() {
if (!('console' in window)) {
window.console = {
@ -455,3 +455,10 @@ if (typeof PDFJS === 'undefined') {
PDFJS.disableRange = true;
}
})();
// Check if the browser supports manipulation of the history.
(function checkHistoryManipulation() {
if (!window.history.pushState) {
PDFJS.disableHistory = true;
}
})();