[ 
https://issues.apache.org/jira/browse/CB-9049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14607884#comment-14607884
 ] 

Vladimir Kotikov edited comment on CB-9049 at 6/30/15 7:44 AM:
---------------------------------------------------------------

Cordova app on Windows itself doesn't runs in WebView, it gets executed 
directly as native code, so, unlike the other platforms, there is no concept of 
Cordova WebView on Windows. Due to this and platform restrictions, 
cordova-windows doesn't support navigation to remote pages. The only way to 
navigate to remote page - open it in iframe/webview ({{InAppBrowser.open}} with 
{{_blank}} option).

The code above will work as you expected only in case of navigating to bundled 
page using {{ms-appx:///}} schema. For reference see 
https://msdn.microsoft.com/en-us/library/windows/apps/hh780594.aspx and 
https://msdn.microsoft.com/library/windows/apps/hh781215.aspx


was (Author: vladimir.kotikov):
The code, you provided, works as expected, because Windows, due to platform 
restrictions, doesn't support navigation to remote pages. The only way to 
navigate to remote page - open it in iframe/webview ({{InAppBrowser.open}} with 
{{_blank}} option).

The code above will work as you expected only in case of navigating to bundled 
page using {{ms-appx:///}} schema. For reference see 
https://msdn.microsoft.com/en-us/library/windows/apps/hh780594.aspx and 
https://msdn.microsoft.com/library/windows/apps/hh781215.aspx

Just for clarification - cordova app on Windows itself doesn't runs in WebView, 
it gets executed directly as native code, so, unlike the other platforms, there 
is no concept of Cordova WebView on Windows.

> InAppBrowser on Windows 8.1 WebView doesn't take the target parameter into 
> the account 
> ---------------------------------------------------------------------------------------
>
>                 Key: CB-9049
>                 URL: https://issues.apache.org/jira/browse/CB-9049
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin InAppBrowser
>         Environment: Windows 8.1
>            Reporter: Babak Vahdat
>            Assignee: Vladimir Kotikov
>
> According to the 
> [documentation|https://github.com/apache/cordova-plugin-inappbrowser#supported-platforms]
>  Windows 8.1 WebView is supported by this plugin. Now given the following 
> simple code inside {{index.html}}
> {code}
> <body>
>   <button id='launch'>Go to Google</button>
>   <script src='cordova.js'></script>
>   <script>
>   document.addEventListener('deviceready', function() {
>     document.querySelector('#launch').addEventListener('click', function() {
>       cordova.InAppBrowser.open('http://www.google.ch', '_self', 
> 'location=no');
>     }, false);
>   }, false);
>   </script>
> </body>
> {code}
> Clicking the button above inside the WebView results in a new _browser_ 
> window being opened pointing to {{http://www.google.ch}}. However my 
> understanding is, given the target value as {{_self}} and the following 
> whitelist entry inside {{config.xml}}
> {code}
> <access origin="*" />
> {code}
> The site should open inside the WebView _itself_. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to