GithubHelp home page GithubHelp logo

Comments (6)

ismailhabib avatar ismailhabib commented on July 18, 2024

That's what I've been using for IE running on Windows 8 (should check whether this is still the case with Windows 10). However, this is not available in any version of IE in older version than Windows 8. See: http://stackoverflow.com/questions/23396303/mslaunchuri-not-available-in-ie11

from custom-protocol-detection.

zowers avatar zowers commented on July 18, 2024

works in windows 10 on internet explorer 11 and edge
btw, it's better to test if( navigator.msLaunchUri ) instead of user agent checks

from custom-protocol-detection.

ismailhabib avatar ismailhabib commented on July 18, 2024

That's exactly what I did (or I misunderstand something here?). I will update the script with IE in windows 10 (and possibly Edge) when I have time. Pull request is also welcome :)

from custom-protocol-detection.

zowers avatar zowers commented on July 18, 2024

no, you first check user agent:

        var isWin8 = /windows nt 6.2/.test(ua) || /windows nt 6.3/.test(ua);

        if (isWin8) {
            openUriUsingIEInWindows8(uri, failCb);

which is not needed, you can check navigator.msLaunchUri directly instead

    window.protocolCheck = function (uri, failCb) {
        var browser = checkBrowser();

        function failCallback() {
            failCb && failCb();
        }

        if (navigator.msLaunchUri)
          navigator.msLaunchUri( uri, function() {}, failCallback );
        if (browser.isFirefox) {
            openUriUsingFirefox(uri, failCallback);
        } else if (browser.isChrome) {
            openUriWithTimeoutHack(uri, failCallback);
        } else if (browser.isIE) {
            openUriUsingIE(uri, failCallback);
        } else {
            //not supported, implement please
        }
    }

from custom-protocol-detection.

ismailhabib avatar ismailhabib commented on July 18, 2024

Implemented.

from custom-protocol-detection.

qiulang avatar qiulang commented on July 18, 2024

I found that some version of IE 11 on win10 does not have this method.

from custom-protocol-detection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.