Interface TriggerInputJs
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptionreadEventProperty(String propertyName) An input that reads a property of the event it is called with.readProperty(Element target, String propertyName) An input that reads a property of an element when it is called.An input that returns the event it is called with.An input that returnsnull, for a slot that is not given an input.returnValue(Object value) An input that returns the given value.
-
Method Details
-
returnValue
An input that returns the given value.- Parameters:
value- the value to return- Returns:
- the input function
-
returnNull
An input that returnsnull, for a slot that is not given an input.- Returns:
- the input function
-
readProperty
An input that reads a property of an element when it is called.- Parameters:
target- the element to read frompropertyName- 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
An input that returns the event it is called with.- Returns:
- the input function
-