StevenJNPearce 3aad35209a
Add browser reload on file change/rebuild
Add browser reload on file change/rebuild
2018-10-22 19:13:50 +02:00

7 lines
183 B
JavaScript

const ws = new WebSocket(`ws://${location.hostname}:${location.port}`);
ws.addEventListener('message', (evt) => {
if(evt.data === 'outputDone') {
location.reload(true);
}
});