I guess you have to make your Foo class public. While code examples in the doc uses default visibility I guess it is just because of laziness during writing the doc ;-)
Here is a recent commit that enforces public visibility: https://gwt-review.googlesource.com/#/c/11490/ Well and as already said the JS.js functionality is simply not yet implemented. So you have to use JSNI factory methods for now. -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.