Skip to content

Commit f7e7360

Browse files
authored
Merge pull request #1 from gorilla/master
improve echo example (gorilla#671)
2 parents 19f614c + e8629af commit f7e7360

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/echo/server.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ window.addEventListener("load", function(evt) {
6969
var d = document.createElement("div");
7070
d.textContent = message;
7171
output.appendChild(d);
72+
output.scroll(0, output.scrollHeight);
7273
};
7374
7475
document.getElementById("open").onclick = function(evt) {
@@ -126,7 +127,7 @@ You can change the message and send multiple times.
126127
<button id="send">Send</button>
127128
</form>
128129
</td><td valign="top" width="50%">
129-
<div id="output"></div>
130+
<div id="output" style="max-height: 70vh;overflow-y: scroll;"></div>
130131
</td></tr></table>
131132
</body>
132133
</html>

0 commit comments

Comments
 (0)