WebSocket for Client OSC Input

Hi i use the Default CasparClient but i want to trigger some things via a Buttonpanel.

I program a little script based on HTML/JS.

But i dont get a connection via WebSocket on the Client…
OSC Port is right in client an i enabled Remote Trigger and give an UID to a element.

With Client 2.0.9 Build on 2017.09.25 it works. But with 2.0.8 not…

 var connection = new WebSocket('ws://127.0.0.1:6250');//Caspar Server IP:PORT

function show(id){
    loadCG(id);
    var myJSON = '{"path" : "/control/'+id+'/play", "args" : [1]}';
    sendCG(myJSON);
}
function hide(id){
    var myJSON = '{"path" : "/control/'+id+'/stop", "args" : [1]}';
    connection.send(myJSON)
    clear(id);
}
function loadCG(id){
    var myJSON = '{"path" : "/control/'+id+'/load", "args" : [1]}';
    connection.send(myJSON);
}
function clear(id){
    var myJSON = '{"path" : "/control/'+id+'/clear", "args" : [1]}';
    sendCG(myJSON);
}