Application Framework Reference

Splunk.Context constructor

Splunk.Context

Instantiate a Splunk.Context instance, which is a dictionary of user-defined name-value pairs.

A context can be shared by modules in a view.

Instantiation

newContextInstance = new Splunk.Context();
 

Example

initContext: function(search) {
    var myContext = new Splunk.Context();

    search.job.setAsAutoCancellable(true);
    search.setBaseSearch(fullSearch);
    myContext.set('search', search);
}