Can websocket errors be ignored as they are not relevant to the preview.
Code that causes the error:
- Code: Select all
var host = location.hostname;
function WebSocketConnect()
{
if ("WebSocket" in window)
{
// Open a web socket
var ws = new WebSocket("ws://" + host + "/ws");
}
}
I know I can avoid the error by checking if host is an empty string and not attempting the open if it is empty, but I feel it would be preferable not to see the error.