Table of Contents

TTMSFNCWXContainerElementAction Class

Binds a handler to a DOM event raised by a specific HTML element inside an element container. When the configured event fires in the hosted web content, the action runs and reports the event back to the application.

API unit family: TMSFNCWXContainer Inherits from: TCollectionItem

Syntax

TTMSFNCWXContainerElementAction = class(TCollectionItem)

Remarks

Add actions through the owning element container, for example with TTMSFNCWXElementContainer.AddAction. Set HTMLElementID to the id of the target element and Event to the DOM event to listen for, then assign OnExecute to react.

Properties

Name Description
CustomEvent The name of the custom event to listen for when Event is set to heCustom.
ElementContainer The element container that owns this action.
Enabled When True, the action listens for its event and runs its handler. When False, the action is ignored.
Event The DOM event on the target element that triggers the action.
EventReturnValue Selects which value of the target element is captured and returned in the event payload when the action fires.
HTMLElementID The id of the HTML element the action attaches its event listener to.
Name A name that identifies the action, used to look it up by name in the action collection.
Tag A user-defined integer that can be associated with the action.

Events

Name Description
OnExecute Occurs when the configured event fires on the target element. The handler receives the event payload and may inspect the returned value.