Answered by:
Webview and Cordova plugins

-
Hi,
I am developing Metro application using the Cordova plugins(https://cordova.apache.org/).
In order to do that I must develop the application using Javascript and html and not using C# and XAML. (According to the Cordova docs).
My application will be side-loaded to BYOD in my company and will not be published to the Store.
My application is a container- it performed authentication and authorization and then should launch a URL (receive the URL from a different application).
The URL is a web application which contains the javascript code which use the Cordova plugins.
Unfortunately, Cordova didn't supply the developers with WebView(http://docs.phonegap.com/en/2.2.0/guide_cordova-webview_android.md.html) so I want to use the Microsoft WebView.
Few questions:
1. How can I use it with javascript and HTML? The documentation doesn't have a code sample for javascript.
2. Can the Microsoft WebView pass headers to the website URL (part of my authentication method) ?
Thanks in advance!
ynahmany
Tuesday, May 27, 2014 7:46 AM
Question
Answers
-
Documentation: http://msdn.microsoft.com/en-us/library/windows/apps/dn301831.aspx
Sample: the HTML WebView control sample.
To pass your own headers use http://msdn.microsoft.com/en-us/library/windows/apps/dn301845.aspx
- Marked as answer by Jamles HezModerator Monday, June 9, 2014 8:09 AM
Tuesday, May 27, 2014 2:28 PMModerator -
They're separate sandboxes and cannot directly interact beyond windows.external.notify and invokeScriptAsync.
--Rob
- Marked as answer by Jamles HezModerator Monday, June 9, 2014 8:09 AM
Wednesday, May 28, 2014 5:02 PMModerator
All replies
-
Documentation: http://msdn.microsoft.com/en-us/library/windows/apps/dn301831.aspx
Sample: the HTML WebView control sample.
To pass your own headers use http://msdn.microsoft.com/en-us/library/windows/apps/dn301845.aspx
- Marked as answer by Jamles HezModerator Monday, June 9, 2014 8:09 AM
Tuesday, May 27, 2014 2:28 PMModerator -
Thanks Rob.
One more question regarding the Webview element:
Assuming the website which the Webview present use one of the Cordova plugins.
Can the Webview use the plugins which are part of the application or they are acting like 2 different sandboxes?ynahmany
Wednesday, May 28, 2014 4:34 PM -
They're separate sandboxes and cannot directly interact beyond windows.external.notify and invokeScriptAsync.
--Rob
- Marked as answer by Jamles HezModerator Monday, June 9, 2014 8:09 AM
Wednesday, May 28, 2014 5:02 PMModerator