mirror of
https://github.com/pyscript/pyscript.git
synced 2026-03-25 23:00:02 -04:00
remove pys-on* and py-on* attributes (#1361)
* remove pys-on* and py-on* attributes * update changelog * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix eslint --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -5,15 +5,13 @@ PyScript provides a convenient syntax for mapping JavaScript events to PyScript
|
||||
For example, you can use the following code to connect the click event to a button:
|
||||
|
||||
```
|
||||
<button id="py-click" py-onClick="foo()">Click me</button>
|
||||
<button id="py-click" py-click="foo()">Click me</button>
|
||||
```
|
||||
|
||||
Here is a list of all the available event mappings:
|
||||
|
||||
| PyScript Event Name | DOM Event Name |
|
||||
|-------------------|----------------|
|
||||
| py-onClick | click |
|
||||
| py-onKeyDown | keydown |
|
||||
| py-afterprint | afterprint |
|
||||
| py-beforeprint | beforeprint |
|
||||
| py-beforeunload | beforeunload |
|
||||
|
||||
Reference in New Issue
Block a user