mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Add a reset
method to the PDFHistory
implementation
This patch addresses a couple of smaller issues with the `PDFHistory` class: - Most, if not all, other viewer components can be reset in one way or another, and there's no good reason for the `PDFHistory` implementation to be different here. - Currently it's (technically) possible to keep adding entries to the browser history, via the `PDFHistory` instance, even after the document has been closed. That obviously makes no sense, and is caused by the lack of a `reset` method. - The internal `this._isPagesLoaded` property was never actually reset, which would lead to it being temporarily wrong when a new document was opened in the default viewer.
This commit is contained in:
parent
903bf177cb
commit
d621899d50
4 changed files with 109 additions and 47 deletions
|
@ -101,6 +101,8 @@ class IPDFHistory {
|
|||
*/
|
||||
initialize({ fingerprint, resetHistory = false, updateUrl = false, }) {}
|
||||
|
||||
reset() {}
|
||||
|
||||
/**
|
||||
* @param {Object} params
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue