Simple trigger example from docs does not work

This issue has been tracked since 2022-10-14.

The second example on the docs for send/trigger does not work:

Repro

<head>

<script src="https://unpkg.com/[email protected]"></script>

</head>
<body>
<div _="on click trigger doIt(answer:42)
        on doIt(answer) log `The answer is $answer`">
  Click Me!
</div>
</body>

or fiddle

Result

scrn-2022-10-14-15-46-03

reedspool wrote this answer on 2022-11-13

Hah this is a funny one. trigger x on y is valid hyperscript, so you either need to include end or change to send

That is, either:

on click trigger doIt(answer:42) end

or

on click send doIt(answer:42)

work perfectly

More Details About Repo
Owner Name bigskysoftware
Repo Name _hyperscript
Full Name bigskysoftware/_hyperscript
Language JavaScript
Created Date 2020-05-27
Updated Date 2022-11-25
Star Count 1265
Watcher Count 18
Fork Count 75
Issue Count 86

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date