Methods
abort()
Abort load: pass to listeners.
- Source
canLoadFile(file) → {boolean}
Check if the loader can load the provided file. True if the file has a 'json' extension.
Name | Type | Description |
---|---|---|
file | File | The file to check. |
- Source
True if the file can be loaded.
- Type:
- boolean
canLoadMemory(mem) → {boolean}
Check if the loader can load the provided memory object.
Name | Type | Description |
---|---|---|
mem | object | The memory object. |
- Source
True if the object can be loaded.
- Type:
- boolean
canLoadUrl(url, optionsopt) → {boolean}
Check if the loader can load the provided url. True if one of the folowing conditions is true:
- the
options.forceLoader
is 'json', - the
options.requestHeaders
contains a 'Accept: application/json' or 'Accept: application/dicom+json', - the url has a 'json' extension.
Name | Type | Attributes | Description |
---|---|---|---|
url | string | The url to check. | |
options | object | <optional> | Optional url request options. |
- Source
True if the url can be loaded.
- Type:
- boolean
isLoading() → {boolean}
Is the load ongoing?
- Source
True if loading.
- Type:
- boolean
load(text, origin, index)
Load data.
Name | Type | Description |
---|---|---|
text | object | The input text. |
origin | string | The data origin. |
index | number | The data index. |
- Source
loadFileAs() → {number}
Get the file content type needed by the loader.
- Source
One of the 'fileContentTypes'.
- Type:
- number
loadUrlAs() → {number}
Get the url content type needed by the loader.
- Source
One of the 'urlContentTypes'.
- Type:
- number
onabort(_event)
Handle an abort event. Default does nothing.
Name | Type | Description |
---|---|---|
_event | object | The abort event. |
- Source
onerror(_event)
Handle an error event. Default does nothing.
Name | Type | Description |
---|---|---|
_event | object | The error event. |
- Source
onload(_event)
Handle a load event. Default does nothing.
Name | Type | Description |
---|---|---|
_event | object | The load event fired when a file has been loaded successfully. |
- Source
onloadend(_event)
Handle an load end event. Default does nothing.
Name | Type | Description |
---|---|---|
_event | object | The load end event fired when a file load has completed, successfully or not. |
- Source
onloaditem(_event)
Handle a load item event. Default does nothing.
Name | Type | Description |
---|---|---|
_event | object | The load item event fired when a file item has been loaded successfully. |
- Source
onloadstart(_event)
Handle a load start event. Default does nothing.
Name | Type | Description |
---|---|---|
_event | object | The load start event. |
- Source
onprogress(_event)
Handle a progress event. Default does nothing.
Name | Type | Description |
---|---|---|
_event | object | The load progress event. |
- Source
setOptions(_opt)
Set the loader options.
Name | Type | Description |
---|---|---|
_opt | object | The input options. |
- Source