onContainerEvents([callback], [remove])

Class: InternalWindowContainer. Method inherited from UIComponent.

Description:

Gets, registers or unregisters an event handler function for container-related events
triggered when a child component is added or removed.

Parameters:

Name Type Default Description

[callback]

function

The event handler function that receives a ContainerEvent 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,    // `add`, `remove`.
  child: object    // The child component that was added or removed
};

Also See: