mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
Attrs doc (#1125)
* adds attr ref * lint * address comments * Addressing to Fabio's rewrite
This commit is contained in:
@@ -27,6 +27,7 @@ Documentation
|
|||||||
- Fixed 'Direct usage of document is deprecated' warning in the getting started guide. ([#1052](https://github.com/pyscript/pyscript/pull/1052))
|
- Fixed 'Direct usage of document is deprecated' warning in the getting started guide. ([#1052](https://github.com/pyscript/pyscript/pull/1052))
|
||||||
- Added reference documentation for the `py-splashscreen` plugin ([#1138](https://github.com/pyscript/pyscript/pull/1138))
|
- Added reference documentation for the `py-splashscreen` plugin ([#1138](https://github.com/pyscript/pyscript/pull/1138))
|
||||||
- Adds doc for installing tests ([#1156](https://github.com/pyscript/pyscript/pull/1156))
|
- Adds doc for installing tests ([#1156](https://github.com/pyscript/pyscript/pull/1156))
|
||||||
|
- Adds docs for custom Pyscript attributes (`py-*`) that allow you to add event listeners to an element ([#1125](https://github.com/pyscript/pyscript/pull/1125))
|
||||||
|
|
||||||
Deprecations and Removals
|
Deprecations and Removals
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|||||||
87
docs/reference/API/attr_to_event.md
Normal file
87
docs/reference/API/attr_to_event.md
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
# List of PyScript Attributes to Events:
|
||||||
|
|
||||||
|
PyScript provides a convenient syntax for mapping JavaScript events to PyScript events, making it easy to connect events to HTML tags.
|
||||||
|
|
||||||
|
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>
|
||||||
|
```
|
||||||
|
|
||||||
|
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 |
|
||||||
|
| py-error | error |
|
||||||
|
| py-hashchange | hashchange |
|
||||||
|
| py-load | load |
|
||||||
|
| py-message | message |
|
||||||
|
| py-offline | offline |
|
||||||
|
| py-online | online |
|
||||||
|
| py-pagehide | pagehide |
|
||||||
|
| py-pageshow | pageshow |
|
||||||
|
| py-popstate | popstate |
|
||||||
|
| py-resize | resize |
|
||||||
|
| py-storage | storage |
|
||||||
|
| py-unload | unload |
|
||||||
|
| py-blur | blur |
|
||||||
|
| py-change | change |
|
||||||
|
| py-contextmenu | contextmenu |
|
||||||
|
| py-focus | focus |
|
||||||
|
| py-input | input |
|
||||||
|
| py-invalid | invalid |
|
||||||
|
| py-reset | reset |
|
||||||
|
| py-search | search |
|
||||||
|
| py-select | select |
|
||||||
|
| py-submit | submit |
|
||||||
|
| py-keydown | keydown |
|
||||||
|
| py-keypress | keypress |
|
||||||
|
| py-keyup | keyup |
|
||||||
|
| py-click | click |
|
||||||
|
| py-dblclick | dblclick |
|
||||||
|
| py-mousedown | mousedown |
|
||||||
|
| py-mousemove | mousemove |
|
||||||
|
| py-mouseout | mouseout |
|
||||||
|
| py-mouseover | mouseover |
|
||||||
|
| py-mouseup | mouseup |
|
||||||
|
| py-mousewheel | mousewheel |
|
||||||
|
| py-wheel | wheel |
|
||||||
|
| py-drag | drag |
|
||||||
|
| py-dragend | dragend |
|
||||||
|
| py-dragenter | dragenter |
|
||||||
|
| py-dragleave | dragleave |
|
||||||
|
| py-dragover | dragover |
|
||||||
|
| py-dragstart | dragstart |
|
||||||
|
| py-drop | drop |
|
||||||
|
| py-scroll | scroll |
|
||||||
|
| py-copy | copy |
|
||||||
|
| py-cut | cut |
|
||||||
|
| py-paste | paste |
|
||||||
|
| py-abort | abort |
|
||||||
|
| py-canplay | canplay |
|
||||||
|
| py-canplaythrough | canplaythrough |
|
||||||
|
| py-cuechange | cuechange |
|
||||||
|
| py-durationchange | durationchange |
|
||||||
|
| py-emptied | emptied |
|
||||||
|
| py-ended | ended |
|
||||||
|
| py-loadeddata | loadeddata |
|
||||||
|
| py-loadedmetadata | loadedmetadata |
|
||||||
|
| py-loadstart | loadstart |
|
||||||
|
| py-pause | pause |
|
||||||
|
| py-play | play |
|
||||||
|
| py-playing | playing |
|
||||||
|
| py-progress | progress |
|
||||||
|
| py-ratechange | ratechange |
|
||||||
|
| py-seeked | seeked |
|
||||||
|
| py-seeking | seeking |
|
||||||
|
| py-stalled | stalled |
|
||||||
|
| py-suspend | suspend |
|
||||||
|
| py-timeupdate | timeupdate |
|
||||||
|
| py-volumechange | volumechange |
|
||||||
|
| py-waiting | waiting |
|
||||||
|
| py-toggle | toggle |
|
||||||
Reference in New Issue
Block a user