Created
August 8, 2017 01:07
-
-
Save joshgillies/bff1e5f6e9ab62869abd6f73c1d22606 to your computer and use it in GitHub Desktop.
hyperHTML starter app
This file contains hidden or 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> | |
<title>hyperHTML Starter App</title> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script src="https://unpkg.com/hyperhtml"></script> | |
<script> | |
function tick(render) { | |
render` | |
<div> | |
<h1>Hello, world!</h1> | |
<h2>It is ${new Date().toLocaleTimeString()}.</h2> | |
</div> | |
` | |
} | |
setInterval(tick, 1000, | |
hyperHTML.bind(document.getElementById('root')) | |
) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment