You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2024/05/01 11:32:47 UTC
(tomcat) 02/02: Increase scrollback
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 4b1e0f1d7b4ae1f7a4824df93363821e57c422ff
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed May 1 12:32:36 2024 +0100
Increase scrollback
Originally for debugging but viewed as generally useful.
---
webapps/docs/changelog.xml | 4 ++++
webapps/examples/websocket/chat.xhtml | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 0e929662fa..e0ccec8de6 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -213,6 +213,10 @@
Examples: Improve performance of WebSocket chat application when
multiple clients disconnect at the same time. (markt)
</fix>
+ <update>
+ Examples: Increase the number of previous messages displayed when using
+ the WebSocket chat application. (markt)
+ </update>
</changelog>
</subsection>
<subsection name="Other">
diff --git a/webapps/examples/websocket/chat.xhtml b/webapps/examples/websocket/chat.xhtml
index 6c863feafa..f5b4dc3579 100644
--- a/webapps/examples/websocket/chat.xhtml
+++ b/webapps/examples/websocket/chat.xhtml
@@ -31,7 +31,7 @@
border: 1px solid #CCCCCC;
border-right-color: #999999;
border-bottom-color: #999999;
- height: 170px;
+ height: 600px;
overflow-y: scroll;
padding: 5px;
width: 100%;
@@ -102,7 +102,7 @@
p.style.wordWrap = 'break-word';
p.innerHTML = message;
console.appendChild(p);
- while (console.childNodes.length > 25) {
+ while (console.childNodes.length > 100) {
console.removeChild(console.firstChild);
}
console.scrollTop = console.scrollHeight;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org