try ‘default’ instead On 30 Nov 2018, 15:17 +0100, Dylan DSouza <[email protected]>, wrote: > I'm porting my Java LIBGDX game to Javascript. There's some JSNI code that > looks something like this: > > private native void hello() > /*-{ > var object1 = {default: 'foo', b: 42}; > console.log(object1.default); > }-*/; > > GWT refuses to compile this, giving me this error: > > > [ERROR] Line 38: invalid property id > > > var object1 = {default: 'foo', b: 42, c: {}}; > > > ------------------------^ > I tried the same code in native Javascript here and it works fine. > > I'm guessing 'default' is some kind of keyword that GWT isn't allowing but I > need to use it, because its expected by the interface I need to send the > object to, specifically the Facebook Instant SDK and its LocalizableContent > object. > > Any help will be appreciated! > -- > You received this message because you are subscribed to the Google Groups > "GWT Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/google-web-toolkit. > For more options, visit https://groups.google.com/d/optout.
-- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
