Created
October 4, 2017 16:23
-
-
Save amantix/190ecbf676787b5c9549760957809fa0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<div id="infoPane" /> | |
<script> | |
var infoPane = document.getElementById('infoPane'); | |
var report = function (msg) { | |
var info = document.createElement('p'); | |
info.textContent = msg; | |
infoPane.appendChild(info); | |
} | |
var source = 'http://localhost:8080/'; | |
var loader = new EventSource(source); | |
loader.onmessage = function (event) { | |
report(event.data); | |
}; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment