Method AsyncResult():then() Foundation
Chains a success handler to execute when the operation completes.
:then( <bSuccessBlock> ) --> oAsyncResult
A new AsyncResult object representing the result of the handler.
Registers a codeblock to execute when the operation completes successfully. This method implements the promise-like chaining pattern, where handlers can be chained to process the results of asynchronous operations.
The success handler will receive the result value as its parameter. If the AsyncResult is already in the "finished" state, the handler is executed immediately. If the AsyncResult is in the "error" state, the handler is not executed at all.
This method returns a new AsyncResult object that represents the result of the handler. This allows for further chaining of success, error, and finalization handlers.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.