Last active
August 29, 2015 13:55
-
-
Save gorhgorh/8702015 to your computer and use it in GitHub Desktop.
test to see if a leapD deamon is running
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Modernizr.addTest('leap', function(){ | |
var leapSupport; | |
// function test leapDeamon presence | |
function checkLeap() { | |
// create a websocket to the lead daemon | |
// i maybe i should just test that, bot something else could provide a webosket here ? | |
var ws = new WebSocket("ws://localhost:6437/"); | |
// if there is one i( provide the event on open | |
return ws.onopen = function(event) { | |
// so i return true | |
return true; | |
}; | |
} | |
return checkLeap(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment