Decorate and render

70 views
Skip to first unread message

siddharth trikha

unread,
May 18, 2012, 12:44:25 AM5/18/12
to Closure Library Discuss
What is the use of decorate and render methods in general? How to use
them?
Help! Thanks

Rhys Brett-Bowen

unread,
May 18, 2012, 2:23:29 AM5/18/12
to Closure Library Discuss
Decorate its for when there is already a Dom structure on the page.
Render is for when the component should create its own Dom structure.

So if you already have a button in your html you would call decorate
on it with goog.ui.button but if you needed to create the element on
the page you would use render

On May 17, 9:44 pm, siddharth trikha <siddharthtrik...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages