Re: JsInterop receipts for simple JSNI code ?

2016-06-25 Thread Thomas Broyer
FWIW, this is tracked at https://github.com/gwtproject/gwt/issues/9364 -- 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 google-web-toolkit+unsubscr...@googlegroups.c

Re: JsInterop receipts for simple JSNI code ?

2016-06-24 Thread 'Goktug Gokdogan' via GWT Users
Sorry I didn't see this question earlier. It will work with both GWT and J2CL; that will be one of the main benefits. On Fri, May 27, 2016 at 6:02 AM, Paul Stockley wrote: > Will this be for J2CL only? > > On Thursday, May 26, 2016 at 6:35:36 PM UTC-4, Goktug Gokdogan wrote: >> >> JsInterop will

Re: JsInterop receipts for simple JSNI code ?

2016-05-27 Thread Paul Stockley
Will this be for J2CL only? On Thursday, May 26, 2016 at 6:35:36 PM UTC-4, Goktug Gokdogan wrote: > > JsInterop will provide some base classes for stuff that are not possible > with JsInterop annotations. > > On Wed, May 25, 2016 at 1:30 PM, Paul Stockley > wrote: > >> Eval is really slow. I wou

Re: JsInterop receipts for simple JSNI code ?

2016-05-26 Thread 'Goktug Gokdogan' via GWT Users
JsInterop will provide some base classes for stuff that are not possible with JsInterop annotations. On Wed, May 25, 2016 at 1:30 PM, Paul Stockley wrote: > Eval is really slow. I would use JSNI. Eventually I think J2CL will have a > way to execute javascript. Just isolate the JSNI in a helper c

Re: JsInterop receipts for simple JSNI code ?

2016-05-25 Thread Paul Stockley
Eval is really slow. I would use JSNI. Eventually I think J2CL will have a way to execute javascript. Just isolate the JSNI in a helper class so it can easily be replaced. On Wednesday, May 25, 2016 at 3:35:07 PM UTC-4, Hristo Stoyanov wrote: > > Actually, it might be possible to do it with JsIn

Re: JsInterop receipts for simple JSNI code ?

2016-05-25 Thread Hristo Stoyanov
Actually, it might be possible to do it with JsInterop only: class Globals { @JsMethod(namespace=GLOBAL) public native Object eval(String expresion); @JsOverlay public native boolean isVariableDefined(String varName){ return Boolean.TRUE.equal

Re: JsInterop receipts for simple JSNI code ?

2016-05-25 Thread Hristo Stoyanov
Jens, Thanks, so apparently JsInterop cannot be a complete replacement of JSNI? I was hoping to be able to wrap in @JsType(native = true) something like Object.keys(window) On Tuesday, May 24, 2016 at

Re: JsInterop receipts for simple JSNI code ?

2016-05-24 Thread Jens
You still need to use JSNI for accessing these properties. Depending on the API you want to build you could define @JsOverlay methods inside @JsType(native = true) classes and let them delegate to a JSNI based utility class. -- J. -- You received this message because you are subscribed to the

JsInterop receipts for simple JSNI code ?

2016-05-24 Thread Hristo Stoyanov
Does any one know (/has easy receipts for) how to replace the following JSNI code with JsInterop code : *public static native String getJSVariableAsString(String jsVarName) /*-{* *return $wnd[jsVarName].toString();* *}-*/;* *private static native boolean isJSVariableDefined(String jsVar