From 2e6d63751f0894d685d277d3283bdf4076d4c020 Mon Sep 17 00:00:00 2001 From: wrightsonm Date: Tue, 17 Nov 2020 14:37:32 +0000 Subject: [PATCH] Updated typings (#817) Co-authored-by: Tim Brust Co-authored-by: Mark --- types/index.d.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index 9de047c..dacda6d 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -8,7 +8,12 @@ // TypeScript Version: 2.3 type channel = "loadstart" | "loadstop" | "loaderror" | "exit" | "message" | "customscheme"; -interface Window { +/** + * The object returned from a call to cordova.InAppBrowser.open. + * NOTE: The InAppBrowser window behaves like a standard web browser, and can't access Cordova APIs. + */ +interface InAppBrowser { + /** * Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser. * @param url The URL to load. @@ -18,13 +23,7 @@ interface Window { * name/value pairs must be separated by a comma. Feature names are case insensitive. */ open(url: string, target?: string, options?: string): InAppBrowser; -} -/** - * The object returned from a call to window.open. - * NOTE: The InAppBrowser window behaves like a standard web browser, and can't access Cordova APIs. - */ -interface InAppBrowser extends Window { onloadstart(type: Event): void; onloadstop(type: InAppBrowserEvent): void; onloaderror(type: InAppBrowserEvent): void;