Events are First Class Citizens

Example from hyperscript.org landing page
Easily send and receive events between elements. Chain events together, filter, queue, or debounce them.

Demo: Send Hello Event

Form Element

This form listens for the "hello" custom event.

Click the button above to send an event to this form!

Waiting for events...

The Exact Code

<button _="on click send hello to <form />">Send</button> <form _="on hello alert('got event')">

Extended Version

<button _="on click send hello to <form />"> Send "hello" to form </button> <form _="on hello put 'Got hello event!' into #event-log add .flash to me wait 300ms remove .flash from me"> ... </form>

Features Demonstrated