initail
This commit is contained in:
+6
-2
@@ -3,13 +3,17 @@
|
||||
<script>
|
||||
const socket = io("http://localhost:8201", {
|
||||
path: '/ws/socket.io',
|
||||
query: 'id=channel'
|
||||
query: 'id=1000_channel'
|
||||
});
|
||||
socket.on('data', (arg) => {
|
||||
socket.on('data', (arg, callback) => {
|
||||
const doc = document.getElementById('test');
|
||||
const div = document.createElement('div');
|
||||
div.innerHTML = JSON.stringify(arg);
|
||||
doc.append(div);
|
||||
|
||||
callback({
|
||||
received: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user