__SetEvents
Introduction
Sets event listeners for a specific Element node.
Syntax
Parameters
- type: A case-sensitive string representing the event type to listen for.
- name: A case-sensitive string representing the event name to listen for.
- function: The function can be a case-sensitive string or null/undefined.
- When the function is a case-sensitive string, the Lynx SDK will send the current Element's parentComponentUniqueID, function, and event to the background thread to call the corresponding entry function when the event is triggered.
- When the function is null or undefined, the Lynx SDK will remove the corresponding listener based on the type and name from the Element object's listeners.
Return Value
No return value.
Example
The frontend framework can generate render instructions as follows.