在我们的web应用程序中,我们需要找出一个自定义URL协议处理程序是否在windows 10机器上注册,是否使用Windows 10边缘浏览器。
如果自定义URL 未在windows 10机器上注册,我们将要求用户下载我们的桌面独立应用程序。如果注册,我们将启动我们的桌面独立应用程序使用注册的自定义URL 。
由于EDGE是一种新的浏览器,其他用户在互联网上提供的解决方案不起作用。
我提到的在边缘浏览器中不适用于我的链接:
https://gist.github.com/keyvanfatehi/f2f521c654bab106fdf9
请帮帮我,谢谢
发布于 2015-07-23 13:23:12
也许这个解决办法能帮上忙:
每当您使用handle导航到未知协议时,Windows都会询问用户有关该应用程序的信息。您只需导航到您的协议,并显示一条消息,其中包含一些信息,说明如果该工具没有打开,应该做什么。像这样的事情(对德国的截图很抱歉):
<div id="toolBox">
<p id="toolBoxText"></p>
<input type="button" id="toolButton" onclick="openTool()" value="Start tool" />
</div>
<script type="text/javascript">
function openTool(){
window.location = 'myprotocol://command/';
document.getElementById("toolButton").value = "Try again";
document.getElementById("toolBoxText").innerHTML = "Thank you for using our tool. If the tool did not open successfully, please first download and install the tool <a href='download/'>here</a> and then try again."
}
</script>

https://stackoverflow.com/questions/31204790
复制相似问题