Conditional or event handler.
| Kind | Attribute |
| Since | 0.1.0 |
| Repeatable | yes |
on <condition-or-event>
Inside a body, branches on the result of the previous step: on success, on error, on not found, on forbidden. Inside a socket or webhook, dispatches on connection events (on connect, on message, on disconnect) or named webhook events (on event <name>).
action /users/create method POST
validate user
query: INSERT INTO user (...) VALUES (...)
on success
redirect /users
on error
respond fragment ".form" query: SELECT * FROM user WHERE id = :id
| Spec last touched | 18cf488 (2026-05-20) |
| Source last touched | af278bb (2026-05-20) |
| Source files | internal/parser/parser.go |