问题
I'm doing some fanciful work of launching a particular program (created by us) from a website. Currently, I'm still in the research phase, so I'm open to very outlandish suggestions.
Basically, our app will open through a "myapp://something" link; something Steam users might be familiar with. However, for usability, we want to safely provide some error scenario if someone clicks such a link without the appropriate program installed. Most browsers simply take you to an unhelpful, full-tab error page, but we have several potential solutions in place, even for older IE browsers.
For the newer IE browsers, I wanted to make use of this API function, apparently introduced in v10: navigator.msLaunchUri()
http://msdn.microsoft.com/en-us/library/ie/jj154912(v=vs.85).aspx
However, myself and several developers have looked for this method using the Developer Console - we're running IE11 on Windows 7 - and it doesn't appear to be present. I've tried on Windows 8 and it appears to be available, but part of me is hoping this is to do with some other possible variance in systems. Can anyone suggest to me why this method might or might not be available?
回答1:
I ended up making a post to Microsoft Connect, and got a reputable answer. It seems that msLaunchUri was added only to Windows 8, but that fact was never documented. This was because Windows 8 was the first Windows version to disable similar-featured protocols like userAgent tokens, Version Vectors, and ActiveX controls. So, msLaunchUri was a sole alternative to improve Store applications.
Hopefully, I'll be able to find appropriate replacement functionality by putting in Version Vectors...
https://connect.microsoft.com/IE/feedback/details/864863/documented-api-function-navigator-mslaunchuri-not-present-in-windows-7
来源:https://stackoverflow.com/questions/23396303/mslaunchuri-not-available-in-ie11