You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
Hey guys,
I am integrating with a library that has a function that looks like
this:
function splat(obj) {
if (!obj || obj.constructor !== Array) {
obj = [obj];
}
return obj;
}
I was sending JsArray instances to it and noticed that it was always
wrapping the object in a new array. I believe that this is because
GWT is running in a hidden iframe.
Therefore I created a jsni method:
public static native JsArray<JavaScriptObject> createArray()/*-{return
new $wnd.Array();}-*/;
This works on the PC. However on firefox and safari on the mac it
does not work. It still always wraps the object in a new array.
Does anyone have any suggestions?
Thank you very much for your help.
Matt Curry
Thomas Broyer
unread,
Jul 12, 2011, 3:23:49 PM7/12/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
Well, first, fix the library so it works cross-window/cross-frame.
As a workaround, I think you can use the xs linker, which won't use an iframe: <add-linker name="xs" />