once

open fun once(eventType: String, listener: EventListener): Int

Add a listener for an EventType, filtered by what the component is allowed to listen for. This listener will be handled only once, at which point it is removed. The response token should be cached by component for use later in the component lifecycle

Return

an empty string if listener was not attached, a UUID in string form if was successfully attached

Parameters

eventType
listener

See also