tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kpreis...@apache.org
Subject svn commit: r1526712 - in /tomcat/trunk/webapps/examples/websocket: chat.xhtml echo.xhtml snake.xhtml
Date Thu, 26 Sep 2013 21:33:33 GMT
Author: kpreisser
Date: Thu Sep 26 21:33:32 2013
New Revision: 1526712

URL: http://svn.apache.org/r1526712
Log:
Improve WebSocket examples:
"use strict"; in JavaScript blocks to enable strict mode.

Modified:
    tomcat/trunk/webapps/examples/websocket/chat.xhtml
    tomcat/trunk/webapps/examples/websocket/echo.xhtml
    tomcat/trunk/webapps/examples/websocket/snake.xhtml

Modified: tomcat/trunk/webapps/examples/websocket/chat.xhtml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/websocket/chat.xhtml?rev=1526712&r1=1526711&r2=1526712&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/websocket/chat.xhtml (original)
+++ tomcat/trunk/webapps/examples/websocket/chat.xhtml Thu Sep 26 21:33:32 2013
@@ -43,6 +43,8 @@
         }
     ]]></style>
     <script type="application/javascript"><![CDATA[
+        "use strict";
+
         var Chat = {};
 
         Chat.socket = null;

Modified: tomcat/trunk/webapps/examples/websocket/echo.xhtml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/websocket/echo.xhtml?rev=1526712&r1=1526711&r2=1526712&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/websocket/echo.xhtml (original)
+++ tomcat/trunk/webapps/examples/websocket/echo.xhtml Thu Sep 26 21:33:32 2013
@@ -50,6 +50,8 @@
         }
     ]]></style>
     <script type="application/javascript"><![CDATA[
+        "use strict";
+
         var ws = null;
 
         function setConnected(connected) {

Modified: tomcat/trunk/webapps/examples/websocket/snake.xhtml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/websocket/snake.xhtml?rev=1526712&r1=1526711&r2=1526712&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/websocket/snake.xhtml (original)
+++ tomcat/trunk/webapps/examples/websocket/snake.xhtml Thu Sep 26 21:33:32 2013
@@ -58,6 +58,7 @@
         <div id="console"/>
     </div>
     <script type="application/javascript"><![CDATA[
+        "use strict";
 
         var Game = {};
 
@@ -82,7 +83,7 @@
 
         Game.initialize = function() {
             this.entities = [];
-            canvas = document.getElementById('playground');
+            var canvas = document.getElementById('playground');
             if (!canvas.getContext) {
                 Console.log('Error: 2d canvas not supported by this browser.');
                 return;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message