Skip to content

Instantly share code, notes, and snippets.

@joshgillies
Created August 8, 2017 01:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joshgillies/bff1e5f6e9ab62869abd6f73c1d22606 to your computer and use it in GitHub Desktop.
Save joshgillies/bff1e5f6e9ab62869abd6f73c1d22606 to your computer and use it in GitHub Desktop.
hyperHTML starter app
<!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