##// END OF EJS Templates
created typings for basic part of dojo and dijit further work is required to...
created typings for basic part of dojo and dijit further work is required to complete typings and separate them from this project dojo-typings replaced with @type/dojo, @type/dijit.

File last commit:

r2:8ec37bf1b4d1 default
r2:8ec37bf1b4d1 default
Show More
registry.d.ts
55 lines | 1.4 KiB | video/mp2t | TypeScriptLexer
import _WidgetBase = require("./_WidgetBase");
interface Registry {
/**
* Number of registered widgets
*/
length: number;
/**
* Add a widget to the registry. If a duplicate ID is detected, a error is thrown.
*/
add(widget: _WidgetBase): void;
/**
* Remove a widget from the registry. Does not destroy the widget; simply
* removes the reference.
*/
remove(id: string): void;
/**
* Find a widget by it's id.
* If passed a widget then just returns the widget.
*/
byId(id: string | _WidgetBase): _WidgetBase;
/**
* Returns the widget corresponding to the given DOMNode
*/
byNode(node: Element | Node): _WidgetBase;
/**
* Convert registry into a true Array
*/
toArray(): _WidgetBase[];
/**
* Generates a unique id for a given widgetType
*/
getUniqueId(widgetType: string): string;
/**
* Search subtree under root returning widgets found.
* Doesn't search for nested widgets (ie, widgets inside other widgets).
*/
findWidgets(root: Node, skipNode?: Node): _WidgetBase[];
/**
* 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
*/
getEnclosingWidget(node: Element | Node): _WidgetBase;
}
declare const registry: Registry;
export = registry;