Example from hyperscript.org landing page
Hyperscript works side by side with existing JavaScript. You choose what and when to enhance.
Use locality of behavior, external behaviors, or write web workers with ease.
<!-- Simple inline JS -->
<button _="on click js alert('Hello!') end">
Alert
</button>
<!-- JS with return value -->
<button _="on click
js return new Date().toISOString() end
put it into #result">
Get ISO Date
</button>
<!-- JS with parameters -->
<button _="on click
set text to #input.value
js(text) return text.toUpperCase() end
put it into #result">
Uppercase
</button>
Features Demonstrated
js ... end - Inline JavaScript blocks
js(param) ... end - JavaScript with parameters from hyperscript
return - Return values from JS to hyperscript
it - Implicit result from previous expression
Full access to browser APIs (navigator, document, etc.)