refactor: Port renderer/web-view to TypeScript (#17250)

This commit is contained in:
Felix Rieseberg 2019-03-07 15:26:23 -08:00 committed by Samuel Attard
parent 8c6bf9c848
commit f3fc4023cf
13 changed files with 441 additions and 301 deletions

View file

@ -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 {