|
@@ -20,15 +20,7 @@
|
|
|
<div class="container-fluid">
|
|
|
<div class="row">
|
|
|
<div class="col-xs-6 col-md-6">
|
|
|
-<!-- <div class="panel panel-default">
|
|
|
- <div class="panel-heading">
|
|
|
- <h3 class="panel-title">Editor</h3>
|
|
|
- </div>
|
|
|
- <div class="panel-body"> -->
|
|
|
<div id="editor"></div>
|
|
|
-<!-- </div>
|
|
|
- </div>
|
|
|
- <div class="text-center">---End of editor---</div> -->
|
|
|
</div>
|
|
|
<div class="col-xs-6 col-md-6">
|
|
|
<p> snippets </p>
|
|
@@ -61,14 +53,17 @@
|
|
|
enableLiveAutocompletion: false
|
|
|
});
|
|
|
var ws = new WebSocket('ws://'+window.location.host+':8080/');
|
|
|
-// ws.onopen = function() {
|
|
|
-// };
|
|
|
-// ws.onclose = function() {
|
|
|
-// document.body.style.backgroundColor = null;
|
|
|
-// };
|
|
|
-// ws.onmessage = function(event) {
|
|
|
-// document.getElementById('count').textContent = event.data;
|
|
|
-// };
|
|
|
+ws.onopen = function(event) {
|
|
|
+ console.log("open ws connection");
|
|
|
+ console.log(event.data);
|
|
|
+ };
|
|
|
+ ws.onclose = function() {
|
|
|
+ console.log("close ws connection");
|
|
|
+ };
|
|
|
+ ws.onmessage = function(event) {
|
|
|
+ console.log("Got data :");
|
|
|
+ console.log(event.data);
|
|
|
+ };
|
|
|
|
|
|
$("#run").click(function(){
|
|
|
ws.send(editor.session.getValue())
|