Skip to content

Instantly share code, notes, and snippets.

@gorhgorh
Last active August 29, 2015 13:55
Show Gist options
  • Save gorhgorh/8702015 to your computer and use it in GitHub Desktop.
Save gorhgorh/8702015 to your computer and use it in GitHub Desktop.
test to see if a leapD deamon is running
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