我正在尝试从 trial.domain.com 连接到 server.domain.com 上的 websocket
Firefox 中的 NS_ERROR_DOM_SECURITY_ERR:
"[Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "https://trial.domain.com/home Line: 454"]"
当我尝试建立 WebSocket 连接时:
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++;
}