mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
refactor: implement <webview> using contextBridge (#29037)
* refactor: implement <webview> using contextBridge * chore: address PR feedback * chore: address PR feedback * fix: check for HTMLIFrameElement instance in attachGuest
This commit is contained in:
11
typings/internal-ambient.d.ts
vendored
11
typings/internal-ambient.d.ts
vendored
@@ -1,9 +1,14 @@
|
||||
/* eslint-disable no-var */
|
||||
declare var internalBinding: any;
|
||||
declare var nodeProcess: any;
|
||||
declare var isolatedWorld: any;
|
||||
declare var binding: { get: (name: string) => any; process: NodeJS.Process; createPreloadScript: (src: string) => Function };
|
||||
|
||||
declare var isolatedApi: {
|
||||
guestViewInternal: any;
|
||||
allowGuestViewElementDefinition: NodeJS.InternalWebFrame['allowGuestViewElementDefinition'];
|
||||
setIsWebView: (iframe: HTMLIFrameElement) => void;
|
||||
createNativeImage: typeof Electron.nativeImage['createEmpty'];
|
||||
}
|
||||
|
||||
declare const BUILDFLAG: (flag: boolean) => boolean;
|
||||
|
||||
declare const ENABLE_DESKTOP_CAPTURER: boolean;
|
||||
@@ -115,6 +120,8 @@ declare namespace NodeJS {
|
||||
|
||||
interface InternalWebFrame extends Electron.WebFrame {
|
||||
getWebPreference<K extends keyof InternalWebPreferences>(name: K): InternalWebPreferences[K];
|
||||
getWebFrameId(window: Window): number;
|
||||
allowGuestViewElementDefinition(context: object, callback: Function): void;
|
||||
}
|
||||
|
||||
interface WebFrameBinding {
|
||||
|
||||
Reference in New Issue
Block a user