new _Loader()
A class to load a file. This wraps a standard AJAX method and
Includes an xmit instance to more easily handle events.
the fetch command performs the load and also returns a promise.
This unit is a pseudo class. This is meant to be compiled with browserify and aliasify. If DEV_MODE environment variable is set to FINAL, this class will load _LoaderAtom class, which contains no parameter validations. Otherwise it will load _Loader class which does.
This unit is a pseudo class. This is meant to be compiled with browserify and aliasify. If DEV_MODE environment variable is set to FINAL, this class will load _LoaderAtom class, which contains no parameter validations. Otherwise it will load _Loader class which does.
- Source:
Methods
(static) _on_error()
internal use function to unlock the loader if
a fetch (load) is throws an error.
- Source:
(static) _on_load()
internal use function to unlock the loader if
a fetch (load) is completed.
- Source:
(static) error(lambda) → {object}
the calback method
Parameters:
| Name | Type | Description |
|---|---|---|
lambda |
function | (optional) |
- Source:
Returns:
loader instance for continuations
- Type
- object
(static) fetch(url, method) → {object}
the method to use when loading. If none, uses this._method
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string | (optional) |
method |
string | (optional) |
- Source:
Returns:
Promise
- Type
- object
(static) loaded(lambda) → {object}
the calback method
Parameters:
| Name | Type | Description |
|---|---|---|
lambda |
function | (optional) |
- Source:
Returns:
loader instance for continuations
- Type
- object
(static) on(channel_name, lambda) → {object}
the calback method
Parameters:
| Name | Type | Description |
|---|---|---|
channel_name |
* | |
lambda |
function | (optional) |
- Source:
Returns:
loader instance for continuations
- Type
- object