feat: add navigationHistory.getEntryAtIndex(int index) method (#41577)

This commit is contained in:
Alice Zhao
2024-03-21 14:59:23 -07:00
committed by GitHub
parent 1036d824fe
commit 00e3445f8a
9 changed files with 164 additions and 9 deletions

View File

@@ -85,9 +85,10 @@ declare namespace Electron {
_print(options: any, callback?: (success: boolean, failureReason: string) => void): void;
_getPrintersAsync(): Promise<Electron.PrinterInfo[]>;
_init(): void;
_getNavigationEntryAtIndex(index: number): Electron.EntryAtIndex | null;
_getActiveIndex(): number;
_historyLength(): number;
canGoToIndex(index: number): boolean;
getActiveIndex(): number;
length(): number;
destroy(): void;
// <webview>
attachToIframe(embedderWebContents: Electron.WebContents, embedderFrameId: number): void;
@@ -112,7 +113,7 @@ declare namespace Electron {
embedder?: Electron.WebContents;
type?: 'backgroundPage' | 'window' | 'browserView' | 'remote' | 'webview' | 'offscreen';
}
type CreateWindowFunction = (options: BrowserWindowConstructorOptions) => WebContents;
interface Menu {
@@ -165,7 +166,6 @@ declare namespace Electron {
_replyChannel: ReplyChannel;
}
// Deprecated / undocumented BrowserWindow methods
interface BrowserWindow {
getURL(): string;