No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
Abortable Actions
A set of actions for a single transaction, such as a click callback, are queued together to be sent to the server. If a user starts another transaction, for example by clicking another button, all abortable actions are removed from the queue. The aborted actions are not sent to the server and their state is set to ABORTED. If some actions have not yet returned from the server, they will complete, but their callbacks will not be called. An abortable action is sent to the server and executed normally unless it hasn’t returned from the server when a subsequent abortable action is added to the queue.
Mark a server-side action as abortable by using the setAbortable() method on the Action object in JavaScript. For example:
You can check for aborted actions in your callback and take appropriate action, such as logging the aborted action, if desired. For example: