prev chunk
Browse files- display/index.html +2 -3
display/index.html
CHANGED
|
@@ -14,10 +14,9 @@
|
|
| 14 |
const eventSource = new EventSource('http://localhost:8343/test');
|
| 15 |
const allText = document.querySelector('.text');
|
| 16 |
const nextText = document.querySelector('.next-text');
|
| 17 |
-
|
| 18 |
eventSource.onmessage = (e) => {
|
| 19 |
-
|
| 20 |
-
nextText.innerHTML = message;
|
| 21 |
|
| 22 |
console.log(e.data);
|
| 23 |
};
|
|
|
|
| 14 |
const eventSource = new EventSource('http://localhost:8343/test');
|
| 15 |
const allText = document.querySelector('.text');
|
| 16 |
const nextText = document.querySelector('.next-text');
|
| 17 |
+
let prevText = ""
|
| 18 |
eventSource.onmessage = (e) => {
|
| 19 |
+
allText.innerHTML += message;
|
|
|
|
| 20 |
|
| 21 |
console.log(e.data);
|
| 22 |
};
|