I would think this would be easier:
public static final native JavaScriptObject deepCopy(JavaScriptObject
obj) /*-{
return eval('{'+JSON.stringify(obj)+'}');
}-*/;
I haven't tested the above code, but it should work.
On Apr 4, 8:51 pm, Dean Huffman wrote:
> Since it took me 3 hours to figu
Since it took me 3 hours to figure out why this doesn't work and I
could not find any other post on the subject, here is one way to do a
deep copy of a JavaScriptObject using JSNI.
public static final native JavaScriptObject deepCopy(JavaScriptObject
obj) /*-{
if (Object.prototype.toString.call(