Demo: dojo.clone
View source. The result is in the console.