Lua v2 Element Table
Representation of a element in the lua v2 script
Contents
Properties:
- content - The text inside a element, value of a input/textarea/select or src of a img/audio/video
- media_context - Only for audio/video, more info here
Functions:
- remove() - Removes the element
Events:
- on_click => callback() - When the element is clicked
- on_input => callback(value) - When text is written/changed in an input/textarea
- on_keypress => callback(key) - When a key is pressed inside an element
- on_load => callback() - When media element loads
- on_submit => callback(value) - When a form is submitted or enter is pressed on a input
Support
| YAB | WXV Core | |
|---|---|---|
| element | None | 1 |
| content | None | 1 |
| media_context | None | 1 |
| remove | None | 1 |
| on_click | None | 1 |
| on_input | None | 1 |
| on_keypress | None | 1 |
| on_load | None | 1 |
| on_submit | None | 1 |