commit | d40f08a33ca7854898fadd2522860768b162da57 | [log] [tgz] |
---|---|---|
author | Jeff Thompson <jeff@thefirst.org> | Sun Feb 24 20:51:17 2013 -0800 |
committer | Jeff Thompson <jeff@thefirst.org> | Sun Feb 24 20:51:17 2013 -0800 |
tree | 3f806b41278d118bcfda485c58159f71d20192ee | |
parent | e2f7b6de9eafe3d198bde2feb5bd35274ac56a82 [diff] [blame] |
In WebSocketTransport constructor, throw an exception if !WebSocket
diff --git a/js/WebSocketTransport.js b/js/WebSocketTransport.js index eb8a938..bc2a3e7 100644 --- a/js/WebSocketTransport.js +++ b/js/WebSocketTransport.js
@@ -4,6 +4,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.