Namespace idx.context

Provides an experimental API containing static methods for creating context scopes according to the DOM hierarchy. Use idx.widget.ContextScope to create scopes and sub-scopes and the methods in this namespace to interact with them. This API is only useful if functional areas of the application are isolated according to the DOM hierarchy. This allows for finding nearby objects and settings by name within a certain locality or globally while isolating others. This functions here are the beginnings of a framework to allow for looser coupling of widgets without causing interference with widgets from different applications when aggregated on the same screen.
Defined in: <idx\context.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Method Summary

Method Attributes Method Name and Description
<static>  
idx.context.get(source, name)
Finds the context for the given source node or widget and attempts to obtain the attribute from it that has the specified name.
<static>  
idx.context.set(source, name, value)
Sets the value of an attribute within the scope closest (most local) to the the specified source node or widget.

Constructor Detail

idx.context

Method Detail

<static> {Object} idx.context.get(source, name)

Finds the context for the given source node or widget and attempts to obtain the attribute from it that has the specified name. If the name is not provided then the context itself is returned.
Parameters:
{Node|Widget} source
The node or widget for which the context is desired.
{String} name
The optional name of the attribute desired from the context and if not specified then the context itself is used as a return value.
Returns:
{Object} The attribute value or context associated with the specified source and name.

<static> {Object} idx.context.set(source, name, value)

Sets the value of an attribute within the scope closest (most local) to the the specified source node or widget. The return value is a reference to the widget representing the scope that was used, or null if the global scope was used.
Parameters:
{Node|Widget} source
The node or widget for which the context is desired.
{String} name
The name of the attribute to be set for the context.
{Object} value
The value to set for the attribute.
Returns:
{Object} The context in which the attribute was set.