Re: jsConstructor returns undefined

2021-11-05 Thread Thomas Broyer


On Friday, November 5, 2021 at 10:33:00 AM UTC+1 Jens wrote:

> You can use jsinterop-base library. It has a method 
> 'Js.asConstructorFn(Class)'


…which uses c...@java.lang.Class::jsConstructor, so if it's null/undefined 
in your own JSNI, there's no reason it won't be in jsinterop-base's 
JSNI: 
https://github.com/google/jsinterop-base/blob/3db256c87fea1b90786451b1814f6354bb39f370/java/jsinterop/base/InternalJsUtil.java#L164-L166
樂
 

> -- J.
>
> pavel@gmail.com schrieb am Dienstag, 2. November 2021 um 09:49:41 
> UTC+1:
>
>> Hi all,
>>
>> I have noticed that the next code returns the undefined value in gwt 2.9.0
>>
>> public static native  Object getCtorFn(Class cls) /*-{
>> $wnd.console.log(cls)
>> $wnd.console.log(c...@java.lang.Class::jsConstructor)
>>
>> return c...@java.lang.Class::jsConstructor;
>> }-*/;
>>
>> Does someone know is jsConstroctor still supported?
>> Or could be there is another way to achieve the same
>>
>

-- 
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.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/5cab2875-da01-4482-8046-b31d201b94b6n%40googlegroups.com.


Re: jsConstructor returns undefined

2021-11-05 Thread Jens
You can use jsinterop-base library. It has a method 
'Js.asConstructorFn(Class)'

-- J.

pavel@gmail.com schrieb am Dienstag, 2. November 2021 um 09:49:41 UTC+1:

> Hi all,
>
> I have noticed that the next code returns the undefined value in gwt 2.9.0
>
> public static native  Object getCtorFn(Class cls) /*-{
> $wnd.console.log(cls)
> $wnd.console.log(c...@java.lang.Class::jsConstructor)
>
> return c...@java.lang.Class::jsConstructor;
> }-*/;
>
> Does someone know is jsConstroctor still supported?
> Or could be there is another way to achieve the same
>

-- 
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.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/3d3174c4-9fa8-4cc2-8208-28779434326bn%40googlegroups.com.