feat: Restore webContents navigation history and page state (#45433)
* feat: Working navigationHistory.restore with just title/url * feat: Restore page state, too * chore: Docs, lint, tests * Implement feedback * More magic * Make _awaitNextLoad truly private * Implement API group feedback * One more round of feedback
This commit is contained in:
parent
6fdfca6e49
commit
9f47c9a051
8 changed files with 259 additions and 10 deletions
2
typings/internal-electron.d.ts
vendored
2
typings/internal-electron.d.ts
vendored
|
@ -87,6 +87,7 @@ declare namespace Electron {
|
|||
}
|
||||
|
||||
interface WebContents {
|
||||
_awaitNextLoad(expectedUrl: string): Promise<void>;
|
||||
_loadURL(url: string, options: ElectronInternal.LoadURLOptions): void;
|
||||
getOwnerBrowserWindow(): Electron.BrowserWindow | null;
|
||||
getLastWebPreferences(): Electron.WebPreferences | null;
|
||||
|
@ -115,6 +116,7 @@ declare namespace Electron {
|
|||
_goToIndex(index: number): void;
|
||||
_removeNavigationEntryAtIndex(index: number): boolean;
|
||||
_getHistory(): Electron.NavigationEntry[];
|
||||
_restoreHistory(index: number, entries: Electron.NavigationEntry[]): void
|
||||
_clearHistory():void
|
||||
canGoToIndex(index: number): boolean;
|
||||
destroy(): void;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue