WebView in WPF application has IE 7 though I have IE 11 installed on my system
Environment
react-native -v: react-native-cli: 2.0.1 react-native: 0.55.4
npm ls rnpm-plugin-windows: [email protected]
npm ls react-native-windows: [email protected]
node -v: v6.11.1
npm -v: 3.10.10
yarn --version:
Then, specify:
Target Platform: WPF Target Platform Version(s): .NET 4.6.0 WPF Target Device(s): Desktop Development Operating System: Windows 10 Pro version: 1709 Visual Studio Version: 2017
Steps to Reproduce
(Write your steps here:)
react-native init test
cd test
npm install --save-dev rnpm-plugin-windows
npm install react-native
react-native wpf
react-native run-wpf
Modify code to include webview and load test html with js below code :
messageFromRN(){
alert(navigator.userAgent); // This will tell the IE version of a webview
var array1 = ['a', 'b', 'c'];
array1.forEach(function(x){concole.log(x)}) // this is supported in IE11 but not in IE7
}
Call 'messageFromRN' from react-native like below
<WebView
source = {testFile}
injectedJavaScript={'messageFromRN()'}
onNavigationStateChange={(navEvent)=> console.log(navEvent.jsEvaluationValue)}
onMessage={(event)=> console.log(event.nativeEvent.data)}
style={{flex: 1}}
/>
Expected Behavior
Webview should have latest IE version or Edge.
Is it possible to have IE 11 or Edge as base for webview in react-native WPF project ?
@ncomo11 take a look at https://github.com/Microsoft/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Win32/Microsoft.Toolkit.Win32.UI.Controls/WPF/WebView. This should allow you to swap out the current WPF WebView implementation with the UWP version that uses Edge.
We are not investing in new features or lower priority bug fixes on vCurrent. The bulk of investment is now in vNext as we prepare to make that the default choice. If this issue is still relevant on the vNext implementation please open a vNext issue. If this issue is of significant severity for a vCurrent app and vNext is not an option, re-open with justification.