From e8629af678b7fe13f35dff5e197de93b4148a909 Mon Sep 17 00:00:00 2001 From: hellflame Date: Sun, 25 Apr 2021 00:20:22 +0800 Subject: [PATCH] improve echo example (#671) --- examples/echo/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/echo/server.go b/examples/echo/server.go index 2f5305fa..61f3dd9b 100644 --- a/examples/echo/server.go +++ b/examples/echo/server.go @@ -69,6 +69,7 @@ window.addEventListener("load", function(evt) { var d = document.createElement("div"); d.textContent = message; output.appendChild(d); + output.scroll(0, output.scrollHeight); }; document.getElementById("open").onclick = function(evt) { @@ -126,7 +127,7 @@ You can change the message and send multiple times. -
+