(defn
get-websocket-imp
[]
(or
(gobj/get goog.global "FIGWHEEL_WEBSOCKET_CLASS")
(gobj/get goog.global "WebSocket")
(cond
(utils/html-or-react-native-env?)
(gobj/get js/window "WebSocket")
(utils/node-env?)
(try (js/require "ws") (catch js/Error e nil))
(utils/worker-env?)
(gobj/get js/self "WebSocket")
:else
nil)))