msLaunchUri not working from WebBrowser Control

310 Views Asked by At

Setup: Windows 10 with IE 11. WebBrowser control in compatibility mode 11011 (11 Forced).

When used from the WebBrowser control navigator.msLaunchUri is defined but it fails to do anything and does not even call the 'fail' function.

navigator.msLaunchUri works from IE 11 on the same machine (although it sometimes inappropriately calls the fail function).

The exact code I'm using is:

navigator.msLaunchUri('skype:5551212', function() { alert('success'); }, function() { alert('fail'); });

Why would it be defined if it doesn't do anything? Or is there some other configuration that must be defined in the host that I'm missing?

1

There are 1 best solutions below

2
Alexander Ryan Baggett On

It works fine for me. All I did was add the meta tag to the html doc to indicate the doc mode.

 <meta http-equiv="x-ua-compatible" content="IE=11">

Screenshot enter image description here

When I don't have the meta tag, it gives me a big fat script error. I suspect you may be suppressing script errors, which would explain why you aren't seeing anything.

Screenshot 2 Script Error