reloadOn function
Generates a JavaScript which will reload the browser on receving a message
from webSocketUri
.
Implementation
String reloadOn(Uri webSocketUri, String message) =>
"new WebSocket('$webSocketUri').onmessage=function(e){if(e.data==='$message')window.location.reload()};";