You can only implement java contract (e.g. PayLoad class) in javascript if
they are marked as isNative. See the related section in the new jsinterop
doc.
On Mon, Oct 26, 2015 at 5:01 AM, Brian Pedersen
wrote:
> Thank's for pointing that out. So i switched to the new
Ignoring initialization is quite complicated when you put in to account
generated clinit and also primitives which becomes compile-time-constants
per jls and automatically inlined. Also code wise it is quite weird and
potentially confusing.
Workaround is quite simple, just remove the "final"
You need to remove initialization as well because the field by Java; the
point is to link to the underlying javascript.
(A field that is defined by a native JsType is "native", meaning it is
linked to underlying javascript and will generate code like
'canvas.nodeType == Node.ELEMENT_NODE')
On
I didn't see it was an interface, as you pointed they implicitly static and
final hence requires initialization.
As you suggested, you can use abstract class as well. Actually in this
particular case (EventTarget,Node etc) as there are actual corresponding
JavaScript types available, it is more
On Sun, Dec 6, 2015 at 5:46 PM, Goktug Gokdogan wrote:
> You need to remove initialization as well because the field by Java; the
> point is to link to the underlying javascript.
>
>
I was going to write "the field *is not owned* by Java"
> (A field that is defined by a
Doesn't matter in javascript; === will still return true for the same
strings.
On Thu, May 26, 2016 at 10:07 AM, Kirill Prazdnikov
wrote:
> Forgot to say:
>
> In Java I have
>
> char data1[] = new char[..];
> char data2[] = new char[..];
>
> String a = new String(data1);
>
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
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
It is possible but just you cannot do it with all types (e.g. int)
In that case, you are forced to declare it as Double instead.
@JsMethod
static void x(Double optD) {
optD = optD == null ? 0 : optD;
}
// javascript
x();
// or
x(156);
I need to add a more detailed section in the
For your purposes in the patch; use internal utility ArrayHelper.setLength.
Normally following is just one way of doing it:
interface NativeArray {
@JsProperty void setLength(int length);
}
((NativeArray) someArray).setLength(42);
On Mon, Mar 7, 2016 at 7:53 PM, Michael Zhou
You can mark it with @JsType.
On Tue, Mar 15, 2016 at 6:10 AM, DavidN wrote:
> I would love to know that too.
>
>
> On Friday, March 11, 2016 at 10:10:06 AM UTC+1, suneel varma wrote:
>>
>> Hi All,
>>
>> How can I make an enum available to Javascript with Jsinterop
>>
>
On Fri, Mar 4, 2016 at 5:18 AM, Eric Nissan wrote:
> I tried that also, but
>
> Data[] thing = JsonUtils.safeEval(response.getText()).cast();
>
> does not compile as Data[] is not a JavaScriptObject
>
Data[] thing = (Data[])(Object)
Dear GWTers!
We are happy to announce that we have opened up J2CL repository for general
access:
http://github.com/google/j2cl
Please see the README for details and instructions.
I also would like to use this opportunity to thank all Googlers who
contributed over the years and made this happen.
13 matches
Mail list logo