0

I'm trying to build an application for Windows Phone 10 using Sencta Touch 2.4.2 and PhoneGap/Cordova. The problem is that the WebView (WebBrowser or EdgeHTML, whatever they call it) uses Internet Explorer 10.

Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 1320)

How can I force the WebView to use Internet Explorer 11 or Microsoft Edge?

ilhan
  • 8,700
  • 35
  • 117
  • 201

1 Answers1

0

Ccheck that you are not setting the documentMode to 10 using 'x-ua-compatible' in your meta tags or http headers. Copy the javascript from here into a script element in the body of your page to detect IE11 running in IE10 mode and see https://stackoverflow.com/a/32431077/436776 for an explanation of what the code is for. I think you can also see if you are using documentMode 10 by looking at the emulation tab on the F12 developer tools from the desktop for your page.

I didn't do the fix, but I recall we had to copy/paste everything into a completely new blank 8.1 project to get it to change the target from 8.0 to 8.1 (nasty). I suspect the issue is that if the project is compiled as an 8.0 target then it uses IE10 mode and just setting the project target to 8.1 didn't fix the problem (Even though recent MS docs say "In apps compiled for Windows 10, WebView uses the Microsoft Edge rendering engine to display HTML content. In apps compiled for Windows 8 or Windows 8.1, WebView uses Internet Explorer 11 in document mode.").

Also I think we may have needed to change the XAML webview component declaration too so that it would use IE11.

Good luck.

Community
  • 1
  • 1
robocat
  • 5,293
  • 48
  • 65