WebSocket JavaScript Constructor