Skip to content

Commit 2a568e5

Browse files
authored
Merge pull request #161 from Neon22/patch-2
Update api.md - non-decorator when example
2 parents 8d7e004 + 28cb196 commit 2a568e5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: 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)