Show TOC

registerOnChange MethodLocate this document in the navigation structure

Use

registerOnChange( callback, types )

Registers for notifications on any change in the collections of specified types. Causes the specified callback function to be called on any such event.

Parameter

Description

callback

A function to call on a collection change event

types (optional)

An array of collection types as defined by the Types enumeration.

If not specified, applies to the collections of all types.

Return Value

None

Sample Code
LSAPI.Collections.registerOnChange( DynamicNavigation.onDynamicLinksChange, [LSAPI.Collections.Types.DYNAMIC_EXTENDED_LINKS, LSAPI.Collections.Types.INPLACE_LINK] );

The onDynamicLinksChange function is called on every change of each collection of the LSAPI.Collections.Types.DYNAMIC_EXTENDED_LINKS and LSAPI.Collections.Types.INPLACE_LINK types.