mirror of
https://github.com/JasonYANG170/IOTConnect-Web.git
synced 2024-11-23 20:26:28 +00:00
13 lines
257 B
JavaScript
13 lines
257 B
JavaScript
|
|
var ws = null
|
|
|
|
if (typeof WebSocket !== 'undefined') {
|
|
ws = WebSocket
|
|
} else if (typeof MozWebSocket !== 'undefined') {
|
|
ws = MozWebSocket
|
|
} else if (typeof window !== 'undefined') {
|
|
ws = window.WebSocket || window.MozWebSocket
|
|
}
|
|
|
|
module.exports = ws
|