Skip to main content

Element Events

Each element type supports a standard set of events that can be subscribed to in order to receive callbacks within your application.

ChangeEvent

Raised whenever the element's value is changed, upon each keypress and after pasting multiple characters into the element.

Schema

PropertyTypeDescription
isCompleteBooleanWhether the element has been completely filled (as specified by the mask)
isEmptyBooleanWhether the element is empty
isValidBooleanThe result of the validator, or true if no validator is specified
detailsList<EventDetails>A list of EventDetails included with this event

EventDetails

PropertyTypeDescription
typeStringThe type of data represented by this detail object
messageStringThe content of this detail object

Usage

myElement.addChangeEventListener {
// handle event
}

FocusEvent

Raised whenever the element receives focus.

Schema

Empty

Usage

myElement.addFocusEventListener {
// handle event
}

BlurEvent

Raised whenever the element loses focus.

Schema

Empty

Usage

myElement.addBlurEventListener {
// handle event
}