How can I dynamically create elements, like labels and such, using the google desktop API? Put differently, how can I duplicate the browser’s:
document.createElement('br');
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sorry for the delayed answer. Look at:
http://code.google.com/apis/desktop/docs/gadget_apiref.html#view
for
appendElement(string xml)
Parses the provided element definition, given in XML format, and appends the element as the last child of this view.
Returns The new element
Usage example is as follows:
I am using this piece of code in my own Gadget but made a few changes to make it generic enough to post here. It should hopefully work as is.