-
Notifications
You must be signed in to change notification settings - Fork 4
Continuation object
The continuation object is a data structure that represents server-side responses to JSON Ajax requests. The data structure is designed to be standardized between the client and the server.
The continuation object defines several common properties. These properties are sent down by the server and processed by jquery.continuations. When the clientside continuation is created, it merges the server-sent properties into a common continuation object.
The common client-side continuation is designed to be extended. That is, you can define properties in addition to the baseline properties. The continuation is made public to allow for prototype usage via:
$.continuations.continuation.prototype.myCustomFunction = function() { };
The common properties returned from the server are:
{ success: false|true, message: '', refresh: false|true, errors: [] }
When the continuation is transformed, the following properties are added:
{ statusCode: (200, 301, 500, etc.), response: (jQuery XHR object) }