feat: extend navigationHistory API (#42014)

* feat: extend navigationHistory API

* refactor: simplify index checking

* refactor: rename 'getHistory' and 'replaceHistory' methods of navigationHistory

* refactor: rename delete*() methods to remove*()

* feat: remove navigationHistory.replaceHistory()

* tests: add tests for removeEntryAtIndex and getAllEntries
This commit is contained in:
Vít Černý 2024-08-19 21:46:04 +02:00 committed by GitHub
parent 4c3014944c
commit 189675575c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 105 additions and 6 deletions

View file

@ -595,7 +595,9 @@ WebContents.prototype._init = function () {
goToOffset: this._goToOffset.bind(this),
getActiveIndex: this._getActiveIndex.bind(this),
length: this._historyLength.bind(this),
getEntryAtIndex: this._getNavigationEntryAtIndex.bind(this)
getEntryAtIndex: this._getNavigationEntryAtIndex.bind(this),
removeEntryAtIndex: this._removeNavigationEntryAtIndex.bind(this),
getAllEntries: this._getHistory.bind(this)
},
writable: false,
enumerable: true