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.