mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #3582 from Rob--W/pushState
Set URL in history.replaceState/pushState
This commit is contained in:
commit
2d489bab22
1 changed files with 4 additions and 3 deletions
|
@ -65,7 +65,8 @@ var PDFHistory = {
|
|||
// is opened in the web viewer.
|
||||
this.reInitialized = true;
|
||||
}
|
||||
window.history.replaceState({ fingerprint: this.fingerprint }, '');
|
||||
window.history.replaceState({ fingerprint: this.fingerprint }, '',
|
||||
document.URL);
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
@ -291,9 +292,9 @@ var PDFHistory = {
|
|||
}
|
||||
}
|
||||
if (overwrite || this.uid === 0) {
|
||||
window.history.replaceState(this._stateObj(params), '');
|
||||
window.history.replaceState(this._stateObj(params), '', document.URL);
|
||||
} else {
|
||||
window.history.pushState(this._stateObj(params), '');
|
||||
window.history.pushState(this._stateObj(params), '', document.URL);
|
||||
}
|
||||
this.currentUid = this.uid++;
|
||||
this.current = params;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue