Interface TriggerInputJs

All Superinterfaces:
Serializable

@JsDefinition public interface TriggerInputJs extends Serializable
The JavaScript of the built-in trigger inputs, as snippets for JsSnippets.of(Class): what Action.Input.toJs(Trigger) returns. An input is a function that produces a value when it is called: a fixed one, a property of an element, or the event or a property of the event it is called with as event. It is passed to an action, which calls it for the value it works on.

For internal use only. May be renamed or removed in a future release.

  • Method Details

    • returnValue

      @JsExpression("return $0") JsFunction returnValue(Object value)
      An input that returns the given value.
      Parameters:
      value - the value to return
      Returns:
      the input function
    • returnNull

      @JsExpression("return null") JsFunction returnNull()
      An input that returns null, for a slot that is not given an input.
      Returns:
      the input function
    • readProperty

      @JsExpression("return $0[$1]") JsFunction readProperty(Element target, String propertyName)
      An input that reads a property of an element when it is called.
      Parameters:
      target - the element to read from
      propertyName - the name of the property
      Returns:
      the input function
    • readEventProperty

      @JsExpression("return event[$0]") @JsFunctionParameterNames("event") JsFunction readEventProperty(String propertyName)
      An input that reads a property of the event it is called with.
      Parameters:
      propertyName - the name of the event property
      Returns:
      the input function
    • returnEvent

      @JsExpression("return event") @JsFunctionParameterNames("event") JsFunction returnEvent()
      An input that returns the event it is called with.
      Returns:
      the input function