mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
feat: redesign preload APIs (#45230)
* feat: redesign preload APIs * docs: remove service-worker mentions for now * fix lint * remove service-worker ipc code * add filename * fix: web preferences preload not included * fix: missing common init * fix: preload bundle script error
This commit is contained in:
7
typings/internal-electron.d.ts
vendored
7
typings/internal-electron.d.ts
vendored
@@ -76,7 +76,7 @@ declare namespace Electron {
|
||||
getOwnerBrowserWindow(): Electron.BrowserWindow | null;
|
||||
getLastWebPreferences(): Electron.WebPreferences | null;
|
||||
_getProcessMemoryInfo(): Electron.ProcessMemoryInfo;
|
||||
_getPreloadPaths(): string[];
|
||||
_getPreloadScript(): Electron.PreloadScript | null;
|
||||
equal(other: WebContents): boolean;
|
||||
browserWindowOptions: BrowserWindowConstructorOptions;
|
||||
_windowOpenHandler: ((details: Electron.HandlerDetails) => any) | null;
|
||||
@@ -330,6 +330,11 @@ declare namespace ElectronInternal {
|
||||
class WebContents extends Electron.WebContents {
|
||||
static create(opts?: Electron.WebPreferences): Electron.WebContents;
|
||||
}
|
||||
|
||||
interface PreloadScript extends Electron.PreloadScript {
|
||||
contents?: string;
|
||||
error?: Error;
|
||||
}
|
||||
}
|
||||
|
||||
declare namespace Chrome {
|
||||
|
||||
Reference in New Issue
Block a user