Android platform
Blackberry platform
Chrome browser
Firefox browser
Internet Explorer browser
iOS platform
Linux Platform
Mobile platform
Playbook platform
Opera browser
OSX platform
Safari browser
Tablet platform Modern smartphone resolution makes this a hit/miss scenario
WebOS platform
Windows platform
Client version
Method allows
Quick way to see if a URI allows a specific verb
Parameters:
uri must be a String.
(URI to query)
verb must be a String.
(HTTP verb)
Returns a Boolean
(true
if the verb is allowed, undefined if unknown)
Method bit
Gets bit value based on args
Parameters:
Returns a Number
(To be set as a bit)
Method cors
Determines if a URI is a CORS end point
Parameters:
Returns a Boolean
(True if CORS)
Method headers
Caches the headers from the XHR response
Parameters:
xhr must be an Object.
(XMLHttpRequest Object)
uri must be a String.
(URI to request)
type must be a String.
(Type of request)
Returns an Object
(Cached URI representation)
Do nothing
Method parse
Parses an XHR response
Parameters:
xhr must be an Object.
(XHR Object)
type must be a String.
([Optional] Content-Type header value)
Returns a Mixed
(Array, Boolean, Document, Number, Object or String)
Method permissions
Returns the permission of the cached URI
Parameters:
Returns an Object
(Contains an Array of available commands, the permission bit and a map)
Method jsonp
Creates a JSONP request
Parameters:
uri must be a String.
(URI to request)
success must be a Function.
(A handler function to execute when an appropriate response been received)
failure must be a Function.
([Optional] A handler function to execute on error)
args can be of any type.
(Custom JSONP handler parameter name, default is "callback"; or custom headers for GET request ( CORS ))
Returns an Object
(Deferred)
Method request
Creates an XmlHttpRequest to a URI ( aliased to multiple methods ) The returned Deferred will have an .xhr property decorated Events: before[type] Fires before the XmlHttpRequest is made, type specific failed[type] Fires on error progress[type] Fires on progress progressUpload[type] Fires on upload progress received[type] Fires on XHR readystate 2 timeout[type] Fires when XmlHttpRequest times out
Parameters:
uri must be a String.
(URI to query)
type must be a String.
(Type of request ( DELETE/GET/POST/PUT/HEAD ))
success must be a Function.
(A handler function to execute when an appropriate response been received)
failure must be a Function.
([Optional] A handler function to execute on error)
args can be of any type.
([Optional] Data to send with the request)
headers must be an Object.
([Optional] Custom request headers ( can be used to set withCredentials ))
timeout must be a Number.
([Optional] Timeout in milliseconds, default is 30000)
Returns an Object
(Deferred)
Using a deferred to resolve request
Decorating XHR for proxy behavior
Setting timeout
Setting events
Setting Content-Type value
Transforming payload
Setting headers (using typeof for PATCH support in IE8)
Cross Origin Resource Sharing ( CORS )
Firing event & sending request
Method response
Caches the URI headers & response if received, and fires the relevant events If abaaso.state.header is set, an application state change is possible Permissions are handled if the ACCEPT header is received; a bit is set on the cached resource Events: after[type] Fires after the XmlHttpRequest response is received, type specific reset Fires if a 206 response is received failure Fires if an exception is thrown headers Fires after a possible state change, with the headers from the response
Parameters:
xhr must be an Object.
(XMLHttpRequest Object)
uri must be a String.
(URI to query)
type must be a String.
(Type of request)
defer must be an Object.
(Deferred to reconcile with the response)
Returns an Undefined
(undefined)
server-side exception handling
Caching headers
Application state change triggered by hypermedia ( HATEOAS )
Method script
Creates a script Element to load an external script
Parameters:
arg must be a String.
(URL to script)
target must be an Object.
([Optional] Element to receive the script)
pos must be a String.
([Optional] Position to create the script at within the target)
Returns an Object
(Script)
Method scroll
Scrolls to a position in the view using a two point bezier curve
Parameters:
dest must be an Array.
(Coordinates)
ms must be a Number.
([Optional] Milliseconds to scroll, default is 250, min is 100)
Returns an Object
(Deferred)
Method scrollPos
Returns the current scroll position of the View
Returns an Array
(Describes the scroll position)
Method size
Returns the visible area of the View
Returns an Array
(Describes the View)
Method stylesheet
Creates a link Element to load an external stylesheet
Parameters:
arg must be a String.
(URL to stylesheet)
media must be a String.
([Optional] Medias the stylesheet applies to)
Returns an Objecct
(Stylesheet)