You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/11/16 23:28:17 UTC

[GitHub] heidji opened a new issue #347: Request: browser.close() should include URLs opened with '_system' and not only '_blank'

heidji opened a new issue #347: Request: browser.close() should include URLs opened with '_system' and not only '_blank'
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/347
 
 
   After a lenghty discussion on [#290](https://github.com/apache/cordova-plugin-inappbrowser/issues/290) we reached the fact that as per docs, only URLs opened with **`'_blank'`** enjoy the capability of being closed with the **`close(`**) method: 
   
   ```
   var ref = cordova.InAppBrowser.open('https://www.google.com', '_blank');
       setTimeout(() => {
           ref.close();
       }, 2000);
   ```
   ^works!
   
   The problem is that AFAIK URLs opened with **`'_blank'`** cannot trigger custom URL scheme calls, meaning that if the website I just opened would try to call back my app using **`"myapp://"`** but would fail because that browser doesn't grant this capability, 
   on the other hand, URLs opened with `**'_system'**` do enjoy this functionality, but sadly cannot be closed after ending their task with **`"ref.close()"`**.
   
   The only reason I opened this bug is because IMO there is no point of having a **`close()`** method when the browser cannot provide feedback to the app.. when should the app know to close the browser? it can't even can't receive any kind of feedback using **`'_blank'`**.
   
   I don't think it should be about choosing being able to close the browser but have a useless external call or have an external call that won't close when it's finished.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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