svghmi/gen_index_xhtml.ysl2
branchsvghmi
changeset 2780 e468f18df200
parent 2779 75c6a31caca6
child 2782 723e420dfe72
--- a/svghmi/gen_index_xhtml.ysl2	Wed Sep 18 11:09:35 2019 +0200
+++ b/svghmi/gen_index_xhtml.ysl2	Thu Sep 19 09:01:49 2019 +0200
@@ -47,20 +47,14 @@
                   }
                   apply "@* | node()";
               }
-              script
-                  ||
-                  (function(){
-                      var relative_URI = window.location.href.replace(/^http(s?:\/\/[^\/]*)\/.*$/, 'ws$1/ws');
-                      var ws = new WebSocket(relative_URI);
-                      ws.onmessage = function (evt) {
-                          var received_msg = evt.data;
-                          alert("Message is received..."+received_msg); 
-                      };
-                      ws.onopen = function (evt) {
-                          ws.send("test");
-                      };
-                  })();
-                  ||
+              script{
+                  /*TODO add :
+                    - pages content
+                      + with ref to elt ?
+                    - widgets parameters
+                  */
+                  include text svghmi.js
+              }
           }
     }