Updated typings (#817)

Co-authored-by: Tim Brust <github@timbrust.de>
Co-authored-by: Mark <mark.wrightson@spreadex.com>
This commit is contained in:
wrightsonm 2020-11-17 14:37:32 +00:00 committed by GitHub
parent 1020b8f642
commit 2e6d63751f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

13
types/index.d.ts vendored
View File

@ -8,7 +8,12 @@
// TypeScript Version: 2.3 // TypeScript Version: 2.3
type channel = "loadstart" | "loadstop" | "loaderror" | "exit" | "message" | "customscheme"; 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. * Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser.
* @param url The URL to load. * @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. * name/value pairs must be separated by a comma. Feature names are case insensitive.
*/ */
open(url: string, target?: string, options?: string): InAppBrowser; 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; onloadstart(type: Event): void;
onloadstop(type: InAppBrowserEvent): void; onloadstop(type: InAppBrowserEvent): void;
onloaderror(type: InAppBrowserEvent): void; onloaderror(type: InAppBrowserEvent): void;