refactor: Port renderer/web-view to TypeScript (#17250)
This commit is contained in:
parent
8c6bf9c848
commit
f3fc4023cf
13 changed files with 441 additions and 301 deletions
28
typings/internal-electron.d.ts
vendored
28
typings/internal-electron.d.ts
vendored
|
@ -80,6 +80,34 @@ declare namespace ElectronInternal {
|
|||
on(channel: string, listener: (event: IpcMainInternalEvent, ...args: any[]) => void): this;
|
||||
once(channel: string, listener: (event: IpcMainInternalEvent, ...args: any[]) => void): this;
|
||||
}
|
||||
|
||||
interface WebFrameInternal extends Electron.WebFrame {
|
||||
getWebFrameId(window: Window): number;
|
||||
allowGuestViewElementDefinition(window: Window, context: any): void;
|
||||
}
|
||||
|
||||
interface WebFrameResizeEvent extends Electron.Event {
|
||||
newWidth: number;
|
||||
newHeight: number;
|
||||
}
|
||||
|
||||
interface WebViewEvent extends Event {
|
||||
url: string;
|
||||
isMainFrame: boolean;
|
||||
}
|
||||
|
||||
abstract class WebViewElement extends HTMLElement {
|
||||
static observedAttributes: Array<string>;
|
||||
|
||||
public contentWindow: Window;
|
||||
|
||||
public connectedCallback(): void;
|
||||
public attributeChangedCallback(): void;
|
||||
public disconnectedCallback(): void;
|
||||
|
||||
// Created in web-view-impl
|
||||
public getWebContents(): Electron.WebContents;
|
||||
}
|
||||
}
|
||||
|
||||
declare namespace Chrome {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue