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 this element satisfies the mask and validator, i.e. it is ready to be tokenized.
isEmptyBooleanWhether this element is empty.
isMaskSatisfiedBooleanWhether this element satisfies the length and format requirements of the mask, if defined. Defaults to true if this element does not have a mask.
isValidBooleanThe result of this element's validator, if defined. Defaults to true if this element does not have a validator.
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
}