In WebSocketTransport constructor, throw an exception if !WebSocket
diff --git a/js/tools/build/ndn-js-uncomp.js b/js/tools/build/ndn-js-uncomp.js
index 31c3998..b947a5c 100644
--- a/js/tools/build/ndn-js-uncomp.js
+++ b/js/tools/build/ndn-js-uncomp.js
@@ -69,6 +69,9 @@
*/
var WebSocketTransport = function WebSocketTransport() {
+ if (!WebSocket)
+ throw new Error("WebSocket support is not available on this platform.");
+
this.ws = null;
this.connectedHost = null; // Read by NDN.
this.connectedPort = null; // Read by NDN.