static S subBot_html_webSocketBasedLogView() {
ret loadJQuery()
+ hpre("", id := 'logView)
+ hreconnectingWebSockets()
+ hjs_htmlencode()
+ hjavascript([[
var ws = new ReconnectingWebSocket("${URI}");
ws.onmessage = function(event) {
var d = event.data;
if (d == "clear")
$("#logView").html("");
else {
$("#logView").append(htmlencode(d.substring(1)));
window.scrollTo(0, 1000000);
}
};
]].replace("${URI}", subBot_myWebSocketURI());
}