Skip to content

Commit 28cb196

Browse files
authored
Update api.md
Add example of manually setting handler without a decorator
1 parent 9610519 commit 28cb196

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/api.md

+3
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,9 @@ def click_handler(event):
653653
them.
654654
"""
655655
display("I've been clicked!")
656+
657+
### Or manually setting handler without a decorator
658+
when("click", "#my-button", handler=click_handler)
656659
```
657660

658661
This functionality is related to the `py-*` or `mpy-*` [HTML attributes](#html-attributes).

0 commit comments

Comments
 (0)