Wednesday, September 21, 2016

Re: Extending native JsTypes from Java with GWT 2.8.0-rc2

If you file a bug please include a simple repro case. In general this seems to be working fine (and is used withing google). So there must be something specific about our particular case.

On Wed, Sep 21, 2016 at 9:43 AM Thomas Broyer <t.broyer@gmail.com> wrote:


On Wednesday, September 21, 2016 at 9:38:16 AM UTC+2, Nándor Előd Fekete wrote:
Hi everyone!

Are we supposed to be able to extend native (browser) JsTypes from Java? Specifically, having the following declaration (from Elemental2):

@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public class HTMLDivElement extends HTMLElement {...}

and the extending type

public class DummyElement extends HTMLDivElement {...}

I'm getting TypeError: Illegal invocation from the compiled js code when it tries to define the class (com.google.gwt.lang.Runtime.copyObjectProperties (Runtime.java:104)), while copying native properties from the extends js type's prototype. The property in this case is 'align' but it happens on other browser native properties too.

Thanks for the help!

All the best,
Nandi.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment