mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
[PDFHistory] Move the IE11 pushState
/replaceState
work-around to src/shared/compatibility.js
(PR 10461 follow-up)
I've always disliked the solution in PR 10461, since it required changes to the `PDFHistory` code itself to deal with a bug in IE11. Now that IE11 support is limited, it seems reasonable to remove these `pushState`/`replaceState` hacks from the main code-base and simply use polyfills instead.
This commit is contained in:
parent
21895aa75a
commit
878432784c
2 changed files with 25 additions and 10 deletions
|
@ -306,18 +306,10 @@ class PDFHistory {
|
|||
}
|
||||
}
|
||||
if (shouldReplace) {
|
||||
if (newUrl) {
|
||||
window.history.replaceState(newState, '', newUrl);
|
||||
} else {
|
||||
window.history.replaceState(newState, '');
|
||||
}
|
||||
window.history.replaceState(newState, '', newUrl);
|
||||
} else {
|
||||
this._maxUid = this._uid;
|
||||
if (newUrl) {
|
||||
window.history.pushState(newState, '', newUrl);
|
||||
} else {
|
||||
window.history.pushState(newState, '');
|
||||
}
|
||||
window.history.pushState(newState, '', newUrl);
|
||||
}
|
||||
|
||||
if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue