Function
A set of widgets indexed by id. A default instance of this class is available as `dijit.registry`
Create a small list of widgets: var ws = new dijit.WidgetSet(); ws.add(dijit.byId("one")); ws.add(dijit.byId("two")); // destroy both: ws.forEach(function(w){ w.destroy(); });
Using dijit.registry: dijit.registry.forEach(function(w){ /* do something */ });
Function
Any dijit._Widget subclass.
Add a widget to this list. If a duplicate ID is detected, a error is thrown.
Function
Remove a widget from this WidgetSet. Does not destroy the widget; simply removes the reference.
Function
A callback function to run for each item. Is passed the widget, the index in the iteration, and the full hash, similar to `dojo.forEach`.
An optional scope parameter
Call specified function for each widget in this set.
Returns self, in order to allow for further chaining.
dijit.WidgetSet
Using the default `dijit.registry` instance: dijit.registry.forEach(function(widget){ console.log(widget.declaredClass); });
Function
Callback function to test truthiness. Is passed the widget reference and the pseudo-index in the object.
Option scope to use for the filter function.
Filter down this WidgetSet to a smaller new WidgetSet Works the same as `dojo.filter` and `dojo.NodeList.filter`
dijit.WidgetSet
Arbitrary: select the odd widgets in this list dijit.registry.filter(function(w, i){ return i % 2 == 0; }).forEach(function(w){ /* odd ones */ });
Function
Find a widget in this list by it's id.
dijit._Widget
Test if an id is in a particular WidgetSet var ws = new dijit.WidgetSet(); ws.add(dijit.byId("bar")); var t = ws.byId("bar") // returns a widget var x = ws.byId("foo"); // returns undefined
Function
The Class to scan for. Full dot-notated string.
Reduce this widgetset to a new WidgetSet of a particular `declaredClass`
dijit.WidgetSet
Find all `dijit.TitlePane`s in a page: dijit.registry.byClass("dijit.TitlePane").forEach(function(tp){ tp.close(); });
Function
Convert this WidgetSet into a true Array
dijit._Widget[]
Work with the widget .domNodes in a real Array dojo.map(dijit.registry.toArray(), function(w){ return w.domNode; });
Function
Create a new Array from this WidgetSet, following the same rules as `dojo.map`
A new array of the returned values.
Array
var nodes = dijit.registry.map(function(w){ return w.domNode; });
Function
A callback function run for every widget in this list. Exits loop when the first false return is encountered.
Optional scope parameter to use for the callback
A synthetic clone of `dojo.every` acting explicitly on this WidgetSet
Boolean
Function
A callback function run for every widget in this list. Exits loop when the first true return is encountered.
Optional scope parameter to use for the callback
A synthetic clone of `dojo.some` acting explictly on this WidgetSet
Boolean
Object
A list of widgets on a page.
Is an instance of `dijit.WidgetSet`
Function
Returns a widget by it's id, or if passed a widget, no-op (like dojo.byId())
dijit._Widget
Function
Generates a unique id for a given widgetType
String
Function
Search subtree under root returning widgets found. Doesn't search for nested widgets (ie, widgets inside other widgets).
Function
Code to destroy all widgets and do other cleanup on page unload Clean up focus manager lingering references to widgets and nodes
Function
Returns the widget corresponding to the given DOMNode
dijit._Widget
Function
Returns the widget whose DOM tree contains the specified DOMNode, or null if the node is not contained within the DOM tree of any widget
Function
Function
Tests if element is tab-navigable even without an explicit tabIndex setting No explicit tabIndex setting, need to investigate node type
Function
Tests if an element is tab-navigable TODO: convert (and rename method) to return effective tabIndex; will save time in _getTabNavigable()
boolean
Function
Finds descendants of the specified root node.
Finds the following descendants of the specified root node: * the first tab-navigable element in document order without a tabIndex or with tabIndex="0" * the last tab-navigable element in document order without a tabIndex or with tabIndex="0" * the first element in document order with the lowest positive tabIndex value * the last element in document order with the highest positive tabIndex value
Function
Finds the descendant of the specified root node that is first in the tabbing order
DomNode
Function
Finds the descendant of the specified root node that is last in the tabbing order
DomNode
Object