dijit.byType = function (type, scope) {
var scope = scope || dojo.body();
var result = [];
var f = function (scope) {
dojo.forEach(dijit.findWidgets(scope), function (w) {
if (w.declaredClass === type) result.push(w);
f(w.domNode);
});
};
f(scope);
return result;
};
Usage:
dijit.byType("dijit.Tree", dojo.body());
No comments:
Post a Comment