Namespace baja.browser.comm
Defined in: browser.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
This namespace is for documentation purposes only and will not actually
be available to Bajascript apps.
|
| Method Attributes | Method Name and Description |
|---|---|
| <private> <static> |
baja.browser.comm.domReady(func)
Waits for the DOM to be initialized and then executes a callback.
|
| <private> <static> |
baja.browser.comm.reconnect()
In a browser,
baja.comm.reconnect will simply reload the
browser page. |
| <private> <static> |
baja.browser.comm.sendHttp(method, uri, async, callback, body, contentType)
Make an HTTP connection using XMLHttpRequest or its MS equivalents.
|
| <private> <static> |
baja.browser.comm.start()
In a browser,
baja.comm.start will wait for the DOM to be
ready (as well as for communications to the station be established)
before executing its callback. |
Namespace Detail
baja.browser.comm
This namespace is for documentation purposes only and will not actually
be available to Bajascript apps. It details enhancements/decorations
applied to functions in
baja.comm when Bajascript is deployed
to a web browser environment.
Method Detail
<private> <static>
baja.browser.comm.domReady(func)
Waits for the DOM to be initialized and then executes a callback.
- Parameters:
- {Function} func
- a function to be executed once the DOM is ready.
<private> <static>
baja.browser.comm.reconnect()
In a browser,
baja.comm.reconnect will simply reload the
browser page.
<private> <static>
baja.browser.comm.sendHttp(method, uri, async, callback, body, contentType)
Make an HTTP connection using XMLHttpRequest or its MS equivalents.
- Parameters:
- {String} method
- the method to use (i.e. 'post' or 'get').
- {String} uri
- the URI used in the connection.
- {Boolean} async
- boolean flag indicating if this is an asynchronous or synchronous call.
- {Object} callback
- this object must have 'ok' and 'fail' functions.
- {String} body Optional
- the body of the HTTP POST.
- {String} contentType Optional
- the Content Type for an HTTP POST.
<private> <static>
baja.browser.comm.start()
In a browser,
baja.comm.start will wait for the DOM to be
ready (as well as for communications to the station be established)
before executing its callback.