Class XHRequest
Wraps an XMLHttpRequest object to load resources asynchronously.
Defined in: benchgl.js.
Constructor Attributes | Constructor Name and Description |
---|---|
XHRequest(options)
Creates a new XHRequest.
|
Method Attributes | Method Name and Description |
---|---|
onAbort(e)
Handles the 'onabort' event of this XHRequest.
|
|
onError(e)
Handles the 'onerror' event of this XHRequest.
|
|
onLoad(e)
Handles the 'onload' event of this XHRequest.
|
|
onProgress(e)
Handles the 'onprogress' event of this XHRequest.
|
|
send()
Executes the request wrapped in this XHRequest.
|
Class Detail
XHRequest(options)
Creates a new XHRequest.
- Parameters:
- {Object} options Optional
- The request's options.
- {String} options.url Optional
- The url for the request.
- {String} options.method Optional
- The method for the request.
- {Boolean} options.async Optional
- Is the request asynchronous?
- {Boolean} options.binary Optional
- Is the response in binary format?
- {Function} options.onProgress Optional
- Callback to call during request processing.
- {Function} options.onLoad Optional
- Callback to call after request loading.
- {Function} options.onError Optional
- Callback to call in case of error.
- {Function} options.onAbort Optional
- Callback to call if the request is aborted.
- {Function} options.onSuccess Optional
- Callback to call in case of success.
Method Detail
onAbort(e)
Handles the 'onabort' event of this XHRequest.
- Parameters:
- e
onError(e)
Handles the 'onerror' event of this XHRequest.
- Parameters:
- e
onLoad(e)
Handles the 'onload' event of this XHRequest.
- Parameters:
- e
onProgress(e)
Handles the 'onprogress' event of this XHRequest.
- Parameters:
- e
send()
Executes the request wrapped in this XHRequest.