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/lynx/lynx-before-publish-event.md.
Lynx
  • English
  • BeforePublishEvent

    lynx.beforePublishEvent is used to register/remove listening for an element event.

    Instance methods

    BeforePublishEvent.add()

    Register a listener for an element event.

    BeforePublishEvent.remove()

    Remove listening for an element event.

    Example

    Register/remove listening for a certain element event.

    //Register to listen for the tap event
    lynx.beforePublishEvent.add('tap', this.handleTap);
    
    //Remove monitoring of tap event
    lynx.beforePublishEvent.remove('tap', this.handleTap);

    Precautions

    Since this is an aspect interface on the background thread, the element element needs to be bound to the corresponding event and triggered, so that the aspect interface can listen to the element event.

    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.