Javascript generic clone() method used in GWT application
问题 I was trying to write a generic clone function which should be able to do true deep cloning. I have come across this link, How to Deep clone in javascript and took the function from there. That code workds pretty well when I try using direct Javascript. I did minor modifications in the code and tried to put in the JSNI code in GWT. clone function: deepCopy = function(item) { if (!item) { return item; } // null, undefined values check var types = [ Number, String, Boolean ], result; //