Dear Roni Hoffman,Currently the definition of .z.ws we are using relies on the .j.j/.j.k functions. However these functions are not able to handle symbol values. This means that it is not possible to call the .html.wssub directly as it is dependant on a symbol argument.One way to solve this would be to define a wrapper function for wssub which casts the argument to a symbol. .i.e.html.wssub1:{.html.wssub `$x}
and please ensure the html subscription has been initialised.html.init[`test]
We can then call .html.wssub1 from Javascript by using the following code. This requires the c.js package available from github//Change the username password host and port
websocket = new WebSocket("ws://username:pass...@127.0.0.1:6000");
msg = {func:".html.wssub1",arg1:"test"};
websocket.send(serialize(JSON.stringify(msg)));
Note you will also need to modify the websocket.onmessage to handle the responses. .i.ewebsocket.onmessage = function(e){
data = JSON.parse(deserialize(e.data));
...
}
You can verify that this has been successful by checking the subscription dictionary on the kdb side using .html.w .I hope this helps resolve your issue.Regards, Kevin O'Hare