If your send calls are in the same Javascript execution context then they will definitely be executed in order. In addition, each send will be received as a whole message by the onmessage handler (i.e. it will not get fragmented).
Same execution context:
function doit () {
ws.send("msg1");
ws.send("msg2");
}
Different execution context:
setTimeout(function () { ws.send("msg1"); }, 100);
setTimeout(function () { ws.send("msg2"); }, 110);
In the second example, the "msg2" is not guaranteed to be delivered after the "msg1". It is likely since the delay specified is slightly longer, but not guaranteed.