Re: Create JavaScript callback in GWT using JSInterop

2016-09-10 Thread Tony
Thank you Zakaria! I had everything except the @JsFunction interface. Here's the full code in case anybody else needs it: @JsType(isNative = true) private static class FbResponse { private String status; private FbAuthResponse authResponse; } @JsType(isNative = true)

Re: Create JavaScript callback in GWT using JSInterop

2016-09-10 Thread Tony
Thank you! I had everything except the @JsFunction. Here's the final code in case anybody else needs it: @JsType(isNative = true) private static class FbResponse { private String status; private FbAuthResponse authResponse; }

Re: Create JavaScript callback in GWT using JSInterop

2016-09-10 Thread zakaria amine
Hello, You need to use @JsFunction, something like that would do the trick in your case: @JsFunction public interface Function{ public JavaScriptObject call(FBResponse event); } and then you can define your FBResponse either using JsInterop or JSNI: @JsType(isNative=true,

Create JavaScript callback in GWT using JSInterop

2016-09-10 Thread Tony
hi In JavaScript, in order to get the login status using the Facebook SDK, one has to call the FB.getLoginStatus like so: FB.getLoginStatus(function(response) { if (response.status === 'connected') // DO SOMETHING }); notice the *function(response) { ... } *that is passed as a

Re: [gwt-contrib] Re: Last call for 2.8.0-RC3

2016-09-10 Thread Arnaud TOURNIER
Makes sense! So better to have a "nostrict" option for the special cases Thanks Le sam. 10 sept. 2016 14:57, Jens a écrit : > > Thank you I will try that -strict option. >> >> My suggestion is that exported @JsType (when the -generateJsExport option >> is turned on)

Re: [gwt-contrib] Re: Last call for 2.8.0-RC3

2016-09-10 Thread Jens
> Thank you I will try that -strict option. > > My suggestion is that exported @JsType (when the -generateJsExport option > is turned on) should be considered as entrypoints and generate compilation > errors, what do you think ? > I think that -strict should be the default everywhere. I don't

Re: [gwt-contrib] Re: Last call for 2.8.0-RC3

2016-09-10 Thread Arnaud TOURNIER
Thank you I will try that -strict option. My suggestion is that exported @JsType (when the -generateJsExport option is turned on) should be considered as entrypoints and generate compilation errors, what do you think ? Le vendredi 9 septembre 2016 17:42:16 UTC+2, Roberto Lublinerman a écrit :

Re: jsinterop with browser-specific api

2016-09-10 Thread Thomas Broyer
Actually, in this case, you could also do it like this: @JsOverlay public void exitFullScreen() { ExitFullScreen exitFullScreen = getExitFullScreen(); if (exitFullScreen == null) { exitFullScreen = getWebkitExitFullscreen(); if (exitFullScreen == null) { exitFullScreen =

[gwt-contrib] Re: CodeServer with Bookmarklets not working in GWT 2.7 (2nd request)

2016-09-10 Thread Thomas Broyer
How about proxying through a local server that would intercept the nocache.js and route everything else to your external server? This is basically how webpack devserver and browserSync work in the JS land. -- You received this message because you are subscribed to the Google Groups "GWT