IOTConnect-Web/node_modules/websocket-stream/ws-fallback.js
2024-05-09 09:49:52 +08:00

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