fix: add missing index arg in navigationHistory.canGoToOffset (#45007)

fix: add missing arg

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: alice <alice@makenotion.com>
This commit is contained in:
trop[bot] 2024-12-12 16:21:52 -05:00 committed by GitHub
parent 3007f859da
commit 5c6d6c1d5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -523,9 +523,9 @@ WebContents.prototype.canGoForward = function () {
};
const canGoToOffsetDeprecated = deprecate.warnOnce('webContents.canGoToOffset', 'webContents.navigationHistory.canGoToOffset');
WebContents.prototype.canGoToOffset = function () {
WebContents.prototype.canGoToOffset = function (index: number) {
canGoToOffsetDeprecated();
return this._canGoToOffset();
return this._canGoToOffset(index);
};
const clearHistoryDeprecated = deprecate.warnOnce('webContents.clearHistory', 'webContents.navigationHistory.clear');

View file

@ -91,7 +91,7 @@ declare namespace Electron {
_historyLength(): number;
_canGoBack(): boolean;
_canGoForward(): boolean;
_canGoToOffset(): boolean;
_canGoToOffset(index: number): boolean;
_goBack(): void;
_goForward(): void;
_goToOffset(index: number): void;