goog.ui.registry
Namespace.getDecorator(element)
Returns an instance of {@link goog.ui.Component} or a subclass suitable to decorate the given element, based on its CSS class.
element
{Element
}
goog.ui.Component
?}
.getDecoratorByClassName(className)
Returns the {@link goog.ui.Component} instance created by the decorator factory function registered for the given CSS class name, or null if no decorator factory function was found.
className
{string
}
goog.ui.Component
?}
.getDefaultRenderer(componentCtor)
Given a {@link goog.ui.Component} constructor, returns an instance of its default renderer. If the default renderer is a singleton, returns the singleton instance; otherwise returns a new instance of the renderer class.
componentCtor
{Function
}
goog.ui.ControlRenderer
?}
.reset()
Resets the global renderer and decorator registry.
.setDecoratorByClassName(className, decoratorFn)
Maps a CSS class name to a function that returns a new instance of {@link goog.ui.Component} or a subclass, suitable to decorate an element that has the specified CSS class.
className
{string
}
decoratorFn
{Function
}
.setDefaultRenderer(componentCtor, rendererCtor)
Sets the default renderer for the given {@link goog.ui.Component} constructor.
componentCtor
{Function
}
rendererCtor
{Function
}