I have the following dojo codes to create a surface graphics element under a div:
....
while(node.firstChild) { node.removeChild(node.firstChild); }