Application Framework Reference

Module API

getLoadState()

The getLoadState() method gets the module load state.

Synopsis

loadstate = getLoadState()

Return Value

Constant

Module load state:

WAITING_FOR_INITIALIZATION
WAITING_FOR_HIERARCHY
WAITING_FOR_CONTEXT
HAS_CONTEXT

Example

if (this.getLoadState() < Splunk.util.moduleLoadStates.HAS_CONTEXT) {
    return;
} else {
    alert('I have a context and can proceed with some useful function');
}
 

See Also

setLoadState()
Splunk.util