I am trying to connect to a websocket on server.domain.com from trial.domain.com
NS_ERROR_DOM_SECURITY_ERR in Firefox:
"[Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "https://trial.domain.com/home Line: 454"]"
when I am trying to make a WebSocket Connection:
try {
  if (window['MozWebSocket'] !== undefined) {
    socket = new MozWebSocket('ws://server.domain.com/chat');
  } else {
    socket = new WebSocket('ws://server.domain.com/chat');
  }
  trails = 0;
} catch(err){
  trials++;
}