mirror of https://github.com/electron/electron
fix: add missing index arg in `navigationHistory.canGoToOffset` (#44989)
fix: add missing argpull/45014/head
parent
6961e9458a
commit
a5b4339884
lib/browser/api
typings
|
@ -514,9 +514,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');
|
||||
|
|
|
@ -93,7 +93,7 @@ declare namespace Electron {
|
|||
_historyLength(): number;
|
||||
_canGoBack(): boolean;
|
||||
_canGoForward(): boolean;
|
||||
_canGoToOffset(): boolean;
|
||||
_canGoToOffset(index: number): boolean;
|
||||
_goBack(): void;
|
||||
_goForward(): void;
|
||||
_goToOffset(index: number): void;
|
||||
|
|
Loading…
Reference in New Issue