onPropertyChange([callback], [remove])

Class: Slider. Method inherited from UIComponent.

Description:

Gets, registers or unregisters an event handler that listens for changes to this component's properties.

Parameters:

Name Type Default Description

[callback]

function

The event handler function that receives a PropertyChangeEvent object. Pass null to unregister all handler functions.

[remove]

boolean

false

Set to true to unregister the event handler.

Returns:

An array of handler functions if no arguments are passed, otherwise this component for method chaining.

Type: this | Array.<function()>

Examples:

// Example event object:
const e = {
  target: object,     // The container component that triggered the event.
  type: string,       // `change`.
  property: string,   // The property that was changed
  oldValue: any,      // Previous value of the changed property
  newValue: any       // New value of the changed property
};

Also See: