According to
https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsJSNI#ca
lling, a call from a non-GWT context to a GWT function should be wrapped with a
call to $entry to catch exceptions, etc.
Two ways to do this (using unqualified Java class names for exposition purposes
only):
1. Wrap the entire JS callback method:
socket.onopen = $entry(function(event) {
listener.@SocketListener::onOpen()();
});
2. Just wrap the Java method:
socket.onopen = function(event) {
$entry(listener.@SocketListener::onOpen())();
};
(N.B., this is $entry(f)(), not $entry(f()).)
Original issue reported on code.google.com by mdemp...@google.com on 3 Apr 2012 at 8:05
Original issue reported on code.google.com by
mdemp...@google.com
on 3 Apr 2012 at 8:05