electron update

Summary:
Started with upgrading electron from 3.0.0 to 4.0.5. This required a bunch of subsequent updates:
* upgrading `electron-builder` to latest version, because the old version couldn't build electron 4 apps.
  * `appDir` is deprecated in builder config, `projectDir` is used instead, which we already had set, so its fine to just remove this ([see GitHub commit](a5e457163e)).
* upgrading `jest-runner/electron` because the old version couldn't run electron 4 tests.
  * upgrading our custom dependency resolution to use electron 4.0.5, because the test runner still resolves to 2.0.8 ([see GitHub issue](https://github.com/facebook-atom/jest-electron-runner/issues/31)).
* updating `sandcastle.sh` to use the new cache files from D14131344.
* removing `package-lock.json` as is was causing warnings. We use `yarn` and `yarn.lock` anyways. This file must have been committed by accident.
* updating our check to only run one version of Flipper at a time to use the new electron API `app.requestSingleInstanceLock` as the old one was removed in electron 4.
* updating the snapshot test that checks App rendering, which changed a little due to the electron upgrade.
* upgrading flow-type definitions to `electron-v4.0.5.js` generated by [electron-flowtype-definitions](https://github.com/danielbuechele/electron-flowtype-definitions).

**PS: Best new feature in Electron 4: Copy&paste working in dev tools**

Reviewed By: jknoxville

Differential Revision: D14131360

fbshipit-source-id: d7ed9643875629a1fa1860bb61b11dd0c64112ab
This commit is contained in:
Daniel Büchele
2019-02-21 02:43:37 -08:00
committed by Facebook Github Bot
parent 0a59dc2918
commit 13f7444013
9 changed files with 1279 additions and 11195 deletions

View File

@@ -5,7 +5,7 @@
* @format
* @flow
*
* This is an autogenerated libdef for: electron-v3.0.0-beta.4 renderer process
* This is an autogenerated libdef for: electron-v4.0.5 renderer process
*/
declare module 'electron' {
@@ -45,7 +45,7 @@ declare module 'electron' {
},
crashReporter: {
start: (options: {
companyName?: ?string,
companyName: string,
submitURL: string,
productName?: ?string,
uploadToServer?: ?boolean,
@@ -77,7 +77,11 @@ declare module 'electron' {
removeAllListeners: (channel: string) => void,
send: (channel: string, ...args: Array<any>) => void,
sendSync: (channel: string, ...args: Array<any>) => any,
sendTo: (windowId: number, channel: string, ...args: Array<any>) => void,
sendTo: (
webContentsId: number,
channel: string,
...args: Array<any>
) => void,
sendToHost: (channel: string, ...args: Array<any>) => void,
},
nativeImage: {
@@ -99,6 +103,7 @@ declare module 'electron' {
},
process: {
crash: () => void,
getCreationTime: () => number | null,
getCPUUsage: () => CPUUsage,
getIOCounters: () => IOCounters,
getHeapStatistics: () => {
@@ -113,10 +118,9 @@ declare module 'electron' {
doesZapGarbage: boolean,
},
getProcessMemoryInfo: () => {
workingSetSize: number,
peakWorkingSetSize: number,
privateBytes: number,
sharedBytes: number,
residentSet: number,
private: number,
shared: number,
},
getSystemMemoryInfo: () => {
total: number,
@@ -124,6 +128,7 @@ declare module 'electron' {
swapTotal: number,
swapFree: number,
},
takeHeapSnapshot: (filePath: string) => boolean,
hang: () => void,
setFdLimit: (maxDescriptors: number) => void,
on: (eventName: 'loaded', callback: () => void) => void,
@@ -133,6 +138,7 @@ declare module 'electron' {
noAsar?: ?boolean,
noDeprecation?: ?boolean,
resourcesPath?: ?string,
sandboxed?: ?boolean,
throwDeprecation?: ?boolean,
traceDeprecation?: ?boolean,
traceProcessWarnings?: ?boolean,
@@ -223,6 +229,7 @@ declare module 'electron' {
disableDomainBlockingFor3DAPIs: () => void,
getAppMetrics: () => Array<ProcessMetric>,
getGPUFeatureStatus: () => GPUFeatureStatus,
getGPUInfo: (infoType: string) => Promise<any>,
setBadgeCount: (count: number) => boolean,
getBadgeCount: () => number,
isUnityRunning: () => boolean,
@@ -250,6 +257,7 @@ declare module 'electron' {
}) => void,
isAccessibilitySupportEnabled: () => boolean,
setAccessibilitySupportEnabled: (enabled: boolean) => void,
showAboutPanel: () => void,
setAboutPanelOptions: (options: {
applicationName?: ?string,
applicationVersion?: ?string,
@@ -260,6 +268,7 @@ declare module 'electron' {
startAccessingSecurityScopedResource: (
bookmarkData: string,
) => Function,
enableSandbox: () => void,
enableMixedSandbox: () => void,
isInApplicationsFolder: () => boolean,
moveToApplicationsFolder: () => boolean,
@@ -384,7 +393,7 @@ declare module 'electron' {
) => void) &
((
eventName: 'session-created',
callback: (event: Event, session: Session) => void,
callback: (session: Session) => void,
) => void) &
((
eventName: 'second-instance',
@@ -393,6 +402,46 @@ declare module 'electron' {
argv: Array<string>,
workingDirectory: string,
) => void,
) => void) &
((
eventName: 'remote-require',
callback: (
event: Event,
webContents: WebContents,
moduleName: string,
) => void,
) => void) &
((
eventName: 'remote-get-global',
callback: (
event: Event,
webContents: WebContents,
globalName: string,
) => void,
) => void) &
((
eventName: 'remote-get-builtin',
callback: (
event: Event,
webContents: WebContents,
moduleName: string,
) => void,
) => void) &
((
eventName: 'remote-get-current-window',
callback: (event: Event, webContents: WebContents) => void,
) => void) &
((
eventName: 'remote-get-current-web-contents',
callback: (event: Event, webContents: WebContents) => void,
) => void) &
((
eventName: 'remote-get-guest-web-contents',
callback: (
event: Event,
webContents: WebContents,
guestWebContents: WebContents,
) => void,
) => void),
once: ((
eventName: 'will-finish-launching',
@@ -515,7 +564,7 @@ declare module 'electron' {
) => void) &
((
eventName: 'session-created',
callback: (event: Event, session: Session) => void,
callback: (session: Session) => void,
) => void) &
((
eventName: 'second-instance',
@@ -524,6 +573,46 @@ declare module 'electron' {
argv: Array<string>,
workingDirectory: string,
) => void,
) => void) &
((
eventName: 'remote-require',
callback: (
event: Event,
webContents: WebContents,
moduleName: string,
) => void,
) => void) &
((
eventName: 'remote-get-global',
callback: (
event: Event,
webContents: WebContents,
globalName: string,
) => void,
) => void) &
((
eventName: 'remote-get-builtin',
callback: (
event: Event,
webContents: WebContents,
moduleName: string,
) => void,
) => void) &
((
eventName: 'remote-get-current-window',
callback: (event: Event, webContents: WebContents) => void,
) => void) &
((
eventName: 'remote-get-current-web-contents',
callback: (event: Event, webContents: WebContents) => void,
) => void) &
((
eventName: 'remote-get-guest-web-contents',
callback: (
event: Event,
webContents: WebContents,
guestWebContents: WebContents,
) => void,
) => void),
isPackaged?: ?boolean,
commandLine: {
@@ -619,10 +708,7 @@ declare module 'electron' {
contentTracing: {
getCategories: (callback: Function) => void,
startRecording: (
options: {
categoryFilter: string,
traceOptions: string,
},
options: TraceCategoriesAndOptions | TraceConfig,
callback: Function,
) => void,
stopRecording: (resultFilePath: string, callback: Function) => void,
@@ -642,7 +728,7 @@ declare module 'electron' {
},
crashReporter: {
start: (options: {
companyName?: ?string,
companyName: string,
submitURL: string,
productName?: ?string,
uploadToServer?: ?boolean,
@@ -864,6 +950,7 @@ declare module 'electron' {
},
process: {
crash: () => void,
getCreationTime: () => number | null,
getCPUUsage: () => CPUUsage,
getIOCounters: () => IOCounters,
getHeapStatistics: () => {
@@ -878,10 +965,9 @@ declare module 'electron' {
doesZapGarbage: boolean,
},
getProcessMemoryInfo: () => {
workingSetSize: number,
peakWorkingSetSize: number,
privateBytes: number,
sharedBytes: number,
residentSet: number,
private: number,
shared: number,
},
getSystemMemoryInfo: () => {
total: number,
@@ -889,6 +975,7 @@ declare module 'electron' {
swapTotal: number,
swapFree: number,
},
takeHeapSnapshot: (filePath: string) => boolean,
hang: () => void,
setFdLimit: (maxDescriptors: number) => void,
on: (eventName: 'loaded', callback: () => void) => void,
@@ -898,6 +985,7 @@ declare module 'electron' {
noAsar?: ?boolean,
noDeprecation?: ?boolean,
resourcesPath?: ?string,
sandboxed?: ?boolean,
throwDeprecation?: ?boolean,
traceDeprecation?: ?boolean,
traceProcessWarnings?: ?boolean,
@@ -978,8 +1066,14 @@ declare module 'electron' {
getDisplayMatching: (rect: Rectangle) => Display,
screenToDipPoint: (point: Point) => Point,
dipToScreenPoint: (point: Point) => Point,
screenToDipRect: (window: BrowserWindow, rect: Rectangle) => Rectangle,
dipToScreenRect: (window: BrowserWindow, rect: Rectangle) => Rectangle,
screenToDipRect: (
window: BrowserWindow | null,
rect: Rectangle,
) => Rectangle,
dipToScreenRect: (
window: BrowserWindow | null,
rect: Rectangle,
) => Rectangle,
on: ((
eventName: 'display-added',
callback: (event: Event, newDisplay: Display) => void,
@@ -1028,7 +1122,8 @@ declare module 'electron' {
openExternal: (
url: string,
options?: ?{
activate: boolean,
activate?: ?boolean,
workingDirectory?: ?string,
},
callback?: ?Function,
) => boolean,
@@ -1047,8 +1142,11 @@ declare module 'electron' {
postNotification: (event: string, userInfo: {}) => void,
postLocalNotification: (event: string, userInfo: {}) => void,
postWorkspaceNotification: (event: string, userInfo: {}) => void,
subscribeNotification: (event: string, callback: Function) => void,
subscribeLocalNotification: (event: string, callback: Function) => void,
subscribeNotification: (event: string, callback: Function) => number,
subscribeLocalNotification: (
event: string,
callback: Function,
) => number,
subscribeWorkspaceNotification: (
event: string,
callback: Function,
@@ -1107,6 +1205,14 @@ declare module 'electron' {
| 'window-text',
) => string,
isInvertedColorScheme: () => boolean,
getEffectiveAppearance: () => 'dark' | 'light' | 'unknown',
getAppLevelAppearance: () => 'dark' | 'light' | 'unknown',
setAppLevelAppearance: (appearance: string | null) => void,
isTrustedAccessibilityClient: (prompt: boolean) => boolean,
getMediaAccessStatus: (
mediaType: string,
) => 'not-determined' | 'granted' | 'denied' | 'restricted' | 'unknown',
askForMediaAccess: (mediaType: 'microphone' | 'camera') => Promise<any>,
on: ((
eventName: 'accent-color-changed',
callback: (event: Event, newColor: string) => void,
@@ -1118,6 +1224,10 @@ declare module 'electron' {
((
eventName: 'inverted-color-scheme-changed',
callback: (event: Event, invertedColorScheme: boolean) => void,
) => void) &
((
eventName: 'appearance-changed',
callback: (newAppearance: 'dark' | 'light') => void,
) => void),
once: ((
eventName: 'accent-color-changed',
@@ -1130,6 +1240,10 @@ declare module 'electron' {
((
eventName: 'inverted-color-scheme-changed',
callback: (event: Event, invertedColorScheme: boolean) => void,
) => void) &
((
eventName: 'appearance-changed',
callback: (newAppearance: 'dark' | 'light') => void,
) => void),
},
webContents: {
@@ -1162,8 +1276,14 @@ declare module 'electron' {
getDisplayMatching: (rect: Rectangle) => Display,
screenToDipPoint: (point: Point) => Point,
dipToScreenPoint: (point: Point) => Point,
screenToDipRect: (window: BrowserWindow, rect: Rectangle) => Rectangle,
dipToScreenRect: (window: BrowserWindow, rect: Rectangle) => Rectangle,
screenToDipRect: (
window: BrowserWindow | null,
rect: Rectangle,
) => Rectangle,
dipToScreenRect: (
window: BrowserWindow | null,
rect: Rectangle,
) => Rectangle,
on: ((
eventName: 'display-added',
callback: (event: Event, newDisplay: Display) => void,
@@ -1203,7 +1323,8 @@ declare module 'electron' {
openExternal: (
url: string,
options?: ?{
activate: boolean,
activate?: ?boolean,
workingDirectory?: ?string,
},
callback?: ?Function,
) => boolean,
@@ -1273,6 +1394,7 @@ declare module 'electron' {
) => void,
getResourceUsage: () => {
images: MemoryUsageDetails,
scripts: MemoryUsageDetails,
cssStyleSheets: MemoryUsageDetails,
xslStyleSheets: MemoryUsageDetails,
fonts: MemoryUsageDetails,
@@ -1426,7 +1548,6 @@ declare module 'electron' {
declare type ProcessMetric = {
pid: number,
type: string,
memory: MemoryInfo,
cpu: CPUUsage,
};
declare type Product = {
@@ -1510,6 +1631,15 @@ declare module 'electron' {
tooltip?: ?string,
flags?: ?Array<string>,
};
declare type TraceCategoriesAndOptions = {
categoryFilter: string,
traceOptions: string,
};
declare type TraceConfig = {
included_categories?: ?Array<string>,
excluded_categories?: ?Array<string>,
memory_dump_config?: ?{},
};
declare type Transaction = {
transactionIdentifier: string,
transactionDate: string,
@@ -1566,9 +1696,11 @@ declare module 'electron' {
baseURLForDataURL?: ?string,
},
) => void;
downloadURL: (url: string) => void;
getURL: () => string;
getTitle: () => string;
isLoading: () => boolean;
isLoadingMainFrame: () => boolean;
isWaitingForResponse: () => boolean;
stop: () => void;
reload: () => void;
@@ -1598,6 +1730,7 @@ declare module 'electron' {
inspectServiceWorker: () => void;
setAudioMuted: (muted: boolean) => void;
isAudioMuted: () => boolean;
isCurrentlyAudible: () => boolean;
undo: () => void;
redo: () => void;
cut: () => void;
@@ -1633,7 +1766,7 @@ declare module 'electron' {
printToPDF: (
options: {
marginsType?: ?number,
pageSize?: ?string,
pageSize?: ?string | Size,
printBackground?: ?boolean,
printSelectionOnly?: ?boolean,
landscape?: ?boolean,
@@ -1646,6 +1779,16 @@ declare module 'electron' {
sendInputEvent: (event: {}) => void;
setZoomFactor: (factor: number) => void;
setZoomLevel: (level: number) => void;
getZoomFactor: (callback: Function) => void;
getZoomLevel: (callback: Function) => void;
setVisualZoomLevelLimits: (
minimumLevel: number,
maximumLevel: number,
) => void;
setLayoutZoomLevelLimits: (
minimumLevel: number,
maximumLevel: number,
) => void;
showDefinitionForSelection: () => void;
getWebContents: () => WebContents;
on: ((
@@ -1928,6 +2071,7 @@ declare module 'electron' {
nodeIntegrationInWorker?: ?boolean,
preload?: ?string,
sandbox?: ?boolean,
enableRemoteModule?: ?boolean,
session?: ?Session,
partition?: ?string,
affinity?: ?string,
@@ -1941,7 +2085,6 @@ declare module 'electron' {
webaudio?: ?boolean,
plugins?: ?boolean,
experimentalFeatures?: ?boolean,
experimentalCanvasFeatures?: ?boolean,
scrollBounce?: ?boolean,
enableBlinkFeatures?: ?string,
disableBlinkFeatures?: ?string,
@@ -2001,13 +2144,16 @@ declare module 'electron' {
isFullScreen: () => boolean;
setSimpleFullScreen: (flag: boolean) => void;
isSimpleFullScreen: () => boolean;
isNormal: () => boolean;
setAspectRatio: (aspectRatio: number, extraSize: Size) => void;
setBackgroundColor: (backgroundColor: string) => void;
previewFile: (path: string, displayName?: ?string) => void;
closeFilePreview: () => void;
setBounds: (bounds: Rectangle, animate?: ?boolean) => void;
getBounds: () => Rectangle;
setContentBounds: (bounds: Rectangle, animate?: ?boolean) => void;
getContentBounds: () => Rectangle;
getNormalBounds: () => Rectangle;
setEnabled: (enable: boolean) => void;
setSize: (width: number, height: number, animate?: ?boolean) => void;
getSize: () => Array<number>;
@@ -2080,7 +2226,14 @@ declare module 'electron' {
baseURLForDataURL?: ?string,
},
) => void;
loadFile: (filePath: string) => void;
loadFile: (
filePath: string,
options?: ?{
query?: ?{},
search?: ?string,
hash?: ?string,
},
) => void;
reload: () => void;
setMenu: (menu: Menu | null) => void;
setProgressBar: (
@@ -2094,6 +2247,7 @@ declare module 'electron' {
hasShadow: () => boolean;
setOpacity: (opacity: number) => void;
getOpacity: () => number;
setShape: (rects: Array<Rectangle>) => void;
setThumbarButtons: (buttons: Array<ThumbarButton>) => boolean;
setThumbnailClip: (region: Rectangle) => void;
setThumbnailToolTip: (toolTip: string) => void;
@@ -2106,11 +2260,17 @@ declare module 'electron' {
}) => void;
showDefinitionForSelection: () => void;
setIcon: (icon: NativeImage) => void;
setWindowButtonVisibility: (visible: boolean) => void;
setAutoHideMenuBar: (hide: boolean) => void;
isMenuBarAutoHide: () => boolean;
setMenuBarVisibility: (visible: boolean) => void;
isMenuBarVisible: () => boolean;
setVisibleOnAllWorkspaces: (visible: boolean) => void;
setVisibleOnAllWorkspaces: (
visible: boolean,
options?: ?{
visibleOnFullScreen?: ?boolean,
},
) => void;
isVisibleOnAllWorkspaces: () => boolean;
setIgnoreMouseEvents: (
ignore: boolean,
@@ -2166,13 +2326,25 @@ declare module 'electron' {
((eventName: 'unmaximize', callback: () => void) => void) &
((eventName: 'minimize', callback: () => void) => void) &
((eventName: 'restore', callback: () => void) => void) &
((
eventName: 'will-resize',
callback: (event: Event, newBounds: Rectangle) => void,
) => void) &
((eventName: 'resize', callback: () => void) => void) &
((
eventName: 'will-move',
callback: (event: Event, newBounds: Rectangle) => void,
) => void) &
((eventName: 'move', callback: () => void) => void) &
((eventName: 'moved', callback: () => void) => void) &
((eventName: 'enter-full-screen', callback: () => void) => void) &
((eventName: 'leave-full-screen', callback: () => void) => void) &
((eventName: 'enter-html-full-screen', callback: () => void) => void) &
((eventName: 'leave-html-full-screen', callback: () => void) => void) &
((
eventName: 'always-on-top-changed',
callback: (event: Event, isAlwaysOnTop: boolean) => void,
) => void) &
((
eventName: 'app-command',
callback: (event: Event, command: string) => void,
@@ -2205,13 +2377,25 @@ declare module 'electron' {
((eventName: 'unmaximize', callback: () => void) => void) &
((eventName: 'minimize', callback: () => void) => void) &
((eventName: 'restore', callback: () => void) => void) &
((
eventName: 'will-resize',
callback: (event: Event, newBounds: Rectangle) => void,
) => void) &
((eventName: 'resize', callback: () => void) => void) &
((
eventName: 'will-move',
callback: (event: Event, newBounds: Rectangle) => void,
) => void) &
((eventName: 'move', callback: () => void) => void) &
((eventName: 'moved', callback: () => void) => void) &
((eventName: 'enter-full-screen', callback: () => void) => void) &
((eventName: 'leave-full-screen', callback: () => void) => void) &
((eventName: 'enter-html-full-screen', callback: () => void) => void) &
((eventName: 'leave-html-full-screen', callback: () => void) => void) &
((
eventName: 'always-on-top-changed',
callback: (event: Event, isAlwaysOnTop: boolean) => void,
) => void) &
((
eventName: 'app-command',
callback: (event: Event, command: string) => void,
@@ -2259,6 +2443,12 @@ declare module 'electron' {
((callback?: ?Function) => void));
abort: () => void;
followRedirect: () => void;
getUploadProgress: () => {
active: boolean,
started: boolean,
current: number,
total: number,
};
chunkedEncoding: boolean;
on: ((
eventName: 'response',
@@ -2470,13 +2660,15 @@ declare module 'electron' {
static buildFromTemplate: (
template: Array<MenuItemConstructorOptions>,
) => Menu;
popup: (options: {
window?: ?BrowserWindow,
x?: ?number,
y?: ?number,
positioningItem?: ?number,
callback?: ?Function,
}) => void;
popup: (
options?: ?{
window?: ?BrowserWindow,
x?: ?number,
y?: ?number,
positioningItem?: ?number,
callback?: ?Function,
},
) => void;
closePopup: (browserWindow?: ?BrowserWindow) => void;
append: (menuItem: MenuItem) => void;
getMenuItemById: (id: string) => MenuItem;
@@ -2511,9 +2703,13 @@ declare module 'electron' {
enabled?: ?boolean,
visible?: ?boolean,
checked?: ?boolean,
registerAccelerator?: ?boolean,
submenu?: ?Array<MenuItemConstructorOptions> | Menu,
id?: ?string,
position?: ?string,
before?: ?Array<string>,
after?: ?Array<string>,
beforeGroupContaining?: ?Array<string>,
afterGroupContaining?: ?Array<string>,
}): MenuItem;
enabled: boolean;
visible: boolean;
@@ -2634,6 +2830,7 @@ declare module 'electron' {
disableNetworkEmulation: () => void;
setCertificateVerifyProc: (proc: Function) => void;
setPermissionRequestHandler: (handler: Function | null) => void;
setPermissionCheckHandler: (handler: Function | null) => void;
clearHostResolverCache: (callback?: ?Function) => void;
allowNTLMCredentialsForDomains: (domains: string) => void;
setUserAgent: (userAgent: string, acceptLanguages?: ?string) => void;
@@ -2658,6 +2855,7 @@ declare module 'electron' {
cookies: Cookies;
webRequest: WebRequest;
protocol: Protocol;
netLog: NetLog;
on: (
eventName: 'will-download',
callback: (
@@ -2728,7 +2926,7 @@ declare module 'electron' {
}) => void;
popUpContextMenu: ((menu?: ?Menu, position?: ?Point) => void) &
((position?: ?Point) => void);
setContextMenu: (menu: Menu) => void;
setContextMenu: (menu: Menu | null) => void;
getBounds: () => Rectangle;
isDestroyed: () => boolean;
on: ((
@@ -2824,7 +3022,14 @@ declare module 'electron' {
baseURLForDataURL?: ?string,
},
) => void;
loadFile: (filePath: string) => void;
loadFile: (
filePath: string,
options?: ?{
query?: ?{},
search?: ?string,
hash?: ?string,
},
) => void;
downloadURL: (url: string) => void;
getURL: () => string;
getTitle: () => string;
@@ -2857,6 +3062,7 @@ declare module 'electron' {
setIgnoreMenuShortcuts: (ignore: boolean) => void;
setAudioMuted: (muted: boolean) => void;
isAudioMuted: () => boolean;
isCurrentlyAudible: () => boolean;
setZoomFactor: (factor: number) => void;
getZoomFactor: (callback: Function) => void;
setZoomLevel: (level: number) => void;
@@ -2912,7 +3118,7 @@ declare module 'electron' {
printToPDF: (
options: {
marginsType?: ?number,
pageSize?: ?string,
pageSize?: ?string | Size,
printBackground?: ?boolean,
printSelectionOnly?: ?boolean,
landscape?: ?boolean,
@@ -2973,12 +3179,6 @@ declare module 'electron' {
callback: Function,
) => boolean;
showDefinitionForSelection: () => void;
setSize: (options: {
enableAutoSize?: ?boolean,
normal?: ?Size,
min?: ?Size,
max?: ?Size,
}) => void;
isOffscreen: () => boolean;
startPainting: () => void;
stopPainting: () => void;
@@ -2996,6 +3196,15 @@ declare module 'electron' {
) => void;
getOSProcessId: () => number;
getProcessId: () => number;
takeHeapSnapshot: (filePath: string) => Promise<any>;
setBackgroundThrottling: (allowed: boolean) => void;
getType: () =>
| 'backgroundPage'
| 'window'
| 'browserView'
| 'remote'
| 'webview'
| 'offscreen';
id: number;
session: Session;
hostWebContents: WebContents;
@@ -3055,6 +3264,29 @@ declare module 'electron' {
((
eventName: 'did-start-navigation',
callback: (
event: Event,
url: string,
isInPlace: boolean,
isMainFrame: boolean,
frameProcessId: number,
frameRoutingId: number,
) => void,
) => void) &
((
eventName: 'will-redirect',
callback: (
event: Event,
url: string,
isInPlace: boolean,
isMainFrame: boolean,
frameProcessId: number,
frameRoutingId: number,
) => void,
) => void) &
((
eventName: 'did-redirect-navigation',
callback: (
event: Event,
url: string,
isInPlace: boolean,
isMainFrame: boolean,
@@ -3288,6 +3520,30 @@ declare module 'electron' {
line: number,
sourceId: string,
) => void,
) => void) &
((
eventName: 'remote-require',
callback: (event: Event, moduleName: string) => void,
) => void) &
((
eventName: 'remote-get-global',
callback: (event: Event, globalName: string) => void,
) => void) &
((
eventName: 'remote-get-builtin',
callback: (event: Event, moduleName: string) => void,
) => void) &
((
eventName: 'remote-get-current-window',
callback: (event: Event) => void,
) => void) &
((
eventName: 'remote-get-current-web-contents',
callback: (event: Event) => void,
) => void) &
((
eventName: 'remote-get-guest-web-contents',
callback: (event: Event, guestWebContents: WebContents) => void,
) => void);
once: ((eventName: 'did-finish-load', callback: () => void) => void) &
((
@@ -3343,6 +3599,29 @@ declare module 'electron' {
((
eventName: 'did-start-navigation',
callback: (
event: Event,
url: string,
isInPlace: boolean,
isMainFrame: boolean,
frameProcessId: number,
frameRoutingId: number,
) => void,
) => void) &
((
eventName: 'will-redirect',
callback: (
event: Event,
url: string,
isInPlace: boolean,
isMainFrame: boolean,
frameProcessId: number,
frameRoutingId: number,
) => void,
) => void) &
((
eventName: 'did-redirect-navigation',
callback: (
event: Event,
url: string,
isInPlace: boolean,
isMainFrame: boolean,
@@ -3576,6 +3855,30 @@ declare module 'electron' {
line: number,
sourceId: string,
) => void,
) => void) &
((
eventName: 'remote-require',
callback: (event: Event, moduleName: string) => void,
) => void) &
((
eventName: 'remote-get-global',
callback: (event: Event, globalName: string) => void,
) => void) &
((
eventName: 'remote-get-builtin',
callback: (event: Event, moduleName: string) => void,
) => void) &
((
eventName: 'remote-get-current-window',
callback: (event: Event) => void,
) => void) &
((
eventName: 'remote-get-current-web-contents',
callback: (event: Event) => void,
) => void) &
((
eventName: 'remote-get-guest-web-contents',
callback: (event: Event, guestWebContents: WebContents) => void,
) => void);
}
declare class WebRequest {
@@ -3741,5 +4044,6 @@ declare module 'electron' {
declare type ReadableStream = any;
declare type MenuItemConstructorOptions = any;
declare type Protocol = any;
declare type NetLog = any;
declare type TouchBarItem = any;
}