(" Websocket"在窗口中)似乎不起作用?

时间:2016-02-01 18:23:26

标签: javascript websocket

我被告知这应该适用于Chrome,但检查的结果始终为case class User(id: Option[Int], name: String) def save(user: User)(implicit session:Session): User = { (users returning users.map(_.id) into ((user,id) => user.copy(id=Some(id)))) += User(None, "mgosk") }

这是我的代码:

false

我总是在控制台中获得if("Websocket" in window){ Echo.socket = new WebSocket(host); } else if("MozWebsocket" in window) { Echo.socket = new MozWebSocket(host); } else { console.log("Error: websocket is not supported by this browser"); return; } 。为什么呢?

1 个答案:

答案 0 :(得分:0)

您对单词"Websocket""MozWebsocket"的大写是错误的。套接字需要大写字母S

您需要在"WebSocket"中查看"MozWebSocket"window