You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ti...@apache.org on 2020/04/03 12:08:44 UTC

[cordova-plugin-inappbrowser] branch master updated: Fix incorrect TypeScript typings (#515)

This is an automated email from the ASF dual-hosted git repository.

timbru31 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-inappbrowser.git


The following commit(s) were added to refs/heads/master by this push:
     new c01f037  Fix incorrect TypeScript typings (#515)
c01f037 is described below

commit c01f037c8ac46a0ebfbed983cce525d4988a67ad
Author: Kamil Burek <kb...@kamilb.info>
AuthorDate: Fri Apr 3 13:08:32 2020 +0100

    Fix incorrect TypeScript typings (#515)
    
    * fix #514
    
    * Update based on conversation in #514
    
    * Fixed whitespace
---
 types/index.d.ts | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/types/index.d.ts b/types/index.d.ts
index fa9e529..9de047c 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -6,7 +6,7 @@
 // Copyright (c) Microsoft Open Technologies Inc
 // Licensed under the MIT license.
 // TypeScript Version: 2.3
-type channel = "loadstart" | "loadstop" | "loaderror" | "exit" | "message";
+type channel = "loadstart" | "loadstop" | "loaderror" | "exit" | "message" | "customscheme";
 
 interface Window {
     /**
@@ -40,6 +40,13 @@ interface InAppBrowser extends Window {
      *                  passed an InAppBrowserEvent object as a parameter.
      */
     addEventListener(type: channel, callback: InAppBrowserEventListenerOrEventListenerObject): void;
+    /**
+     * Adds a listener for an event from the InAppBrowser.
+     * @param type      any custom event that might occur.
+     * @param callback  the function that executes when the event fires. The function is
+     *                  passed an InAppBrowserEvent object as a parameter.
+     */
+    addEventListener(type: string, callback: InAppBrowserEventListenerOrEventListenerObject): void;
     // removeEventListener overloads
     /**
      * Removes a listener for an event from the InAppBrowser.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org