I have a variable in Javascript, which toggles between true and false when full-screen mode is switched on and off, respectively. Now I want to access that variable in my GWT code, and do some actions accordingly. Can anyone tell me how to do it? I couldn’t understand it from the Google documentation on JSNI…
I have a variable in Javascript, which toggles between true and false when full-screen
Share
In JavaScript
your JSNI method in MyClass class ;
Finally using in GWT ;
As @dodoot raised the point you can try this
return !!$wnd[jsVar]to get ridoffevalfunction side effects.As @manolo said if you are using gwtQuery it will be more handy by writing simply
$(window).prop("mybool").