DS Server

RequestCollectionElementCallback Function

Function

Description

Callback function for getNext() requests executed on collections. Receives the result via two parameters, the first one being the element itself (or null if the end of the collection has been reached) and the second one indicating that the call was successful.

Syntax

function(<object> element, <boolean> moved)

Examples

The following example demonstrates RequestCollectionElementCallback in a practical document-editing workflow. Callback function for getNext() requests executed on collections. Receives the result via two parameters, the first one being the element itself (or null if the end of the collection has been reached) and the second one indicating that the call was successful.

function requestCollectionElementCallback(element, moved) {
    console.log("Callback values:", { element, moved });
}