It's possible to open a URL in Edge Spartan thanks to microsoft-edge:
protocol. This works in any browser on Windows 10. For example:
<a href="microsoft-edge:https://www.cnn.com">CNN</a>
Note however that this does not (yet?) work with Edge Chromium.
Checking if browser is IE11 on Windows 10 can be done for example as follows:
if (document.documentMode === 11 && navigator.userAgent.indexOf('Windows NT 10.0') > -1) {
...
}
If you want to create an Edge link to the current page (without hardcoding), you can do it with JavaScript:
myAnchor.href = 'microsoft-edge:' + document.URL;
Demo: https://jg-testpage.github.io/ie11/open-in-edge.html?foo=bar&baz=quux