private static WebsocketsUpdate ( string path ) : string | ||
path | string | |
return | string |
private static string WebsocketsUpdate(string path) {
return $@"<pre></pre><script>
var pre = document.querySelector('pre');
new WebSocket('ws://' + location.host + '{path}').onmessage = function(e){{ pre.textContent = JSON.stringify(JSON.parse(e.data), null, 4) }};
</script>";
}