Merge pull request #3581 from yurydelendik/pushState

Misc IE fixes
This commit is contained in:
Yury Delendik 2013-08-16 07:44:33 -07:00
commit 5ca1c84564
2 changed files with 4 additions and 4 deletions

View File

@ -489,7 +489,7 @@ var Util = PDFJS.Util = (function UtilClosure() {
var loaded = false; var loaded = false;
script.setAttribute('src', src); script.setAttribute('src', src);
if (callback) { if (callback) {
script.onreadystatechange = script.onload = function() { script.onload = function() {
if (!loaded) { if (!loaded) {
callback(); callback();
} }

View File

@ -65,7 +65,7 @@ var PDFHistory = {
// is opened in the web viewer. // is opened in the web viewer.
this.reInitialized = true; this.reInitialized = true;
} }
window.history.replaceState({ fingerprint: this.fingerprint }, '', ''); window.history.replaceState({ fingerprint: this.fingerprint }, '');
} }
var self = this; var self = this;
@ -270,9 +270,9 @@ var PDFHistory = {
} }
} }
if (overwrite || this.uid === 0) { if (overwrite || this.uid === 0) {
window.history.replaceState(this._stateObj(params), '', ''); window.history.replaceState(this._stateObj(params), '');
} else { } else {
window.history.pushState(this._stateObj(params), '', ''); window.history.pushState(this._stateObj(params), '');
} }
this.currentUid = this.uid++; this.currentUid = this.uid++;
this.current = params; this.current = params;