8000 Update api.md - non-decorator when example by Neon22 · Pull Request #161 · pyscript/docs · GitHub
[go: up one dir, main page]

Skip to content

Update api.md - non-decorator when example #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update api.md
Add example of manually setting handler without a decorator
  • Loading branch information
Neon22 authored Jan 25, 2025
commit 28cb196c141ab568513d97b23f9b7ee7a07ee2ab
3 changes: 3 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,9 @@ def click_handler(event):
them.
"""
display("I've been clicked!")

### Or manually setting handler withou 4A5A t a decorator
when("click", "#my-button", handler=click_handler)
```

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