For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/lynx-api/event/event.md.
Lynx
  • English
  • Event

    Event represents the event object when the event is triggered, which contains the state information when the event is triggered. Developers can listen through the Event Handler Property.

    Lynx has many different types of event objects, all of which are directly or indirectly inherited from Event. Event itself contains properties and methods applicable to all event objects.

    Event type

    TouchEvent

    TouchEvent represents a touch event object, which describes the state change of a finger on a touch surface (such as a touch screen).

    CustomEvent

    CustomEvent represents a custom event object, which describes the state change of a custom component.

    AnimationEvent

    AnimationEvent represents an animation event object, describing the state changes of the CSS animation life cycle.

    MouseEvent

    MouseEvent represents a mouse event, describing the user's interaction with the mouse.

    KeyEvent

    KeyEvent represents a keyboard event, describing the user's interaction with the keyboard.

    WheelEvent

    WheelEvent represents a mouse wheel event, describing the user scrolling the mouse wheel or touchpad.

    Instance property

    type

    type: string;

    Indicates the type of event.

    timestamp

    timestamp: number;

    Indicates the timestamp when the event was generated.

    target

    target: {
      id: string,
      uid: number,
      dataset: [key: string]: any,
    }

    Indicates a collection of some attribute values ​​of element that triggered the event.

    • id: element's id selector.
    • uid: element's unique identifier in Lynx Engine.
    • dataset: A collection of custom attributes starting with data- on element.

    currentTarget

    currentTarget: {
      id: string,
      uid: number,
      dataset: [key: string]: any,
    }

    A collection of attribute values ​​of element that listens to events.

    • id: element's id selector.
    • uid: element's unique identifier in Lynx Engine.
    • dataset: A collection of custom attributes starting with data- on element.

    Instance method

    stopPropagation MTS Only

    stopPropagation(): void;

    Stop bubbling and prevent the event from continuing to bubble up the touch response chain.

    Calling it in the main thread script can affect both event bubbling and event handler triggering in JS.

    stopImmediatePropagation MTS Only

    stopImmediatePropagation(): void;

    Stop bubbling, prevent the event from continuing to bubble in the event response chain, and prevent other event handlers of the same event on the current node from being triggered.

    Calling it in the main thread script can affect both event bubbling and event handler triggering in JS.

    Compatibility

    LCD tables only load in the browser

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.