> Awesome. Thank you. @JsOverlay did the trick.
>

But IMHO @JsOverlay is only a workaround because it is meant to be used for 
code additions that do not exist in the underlying native type. So in your 
case GWT will now generate some additional code for your constants and will 
not use $wnd.Node.ELEMENT_NODE when doing comparisons. The link Thomas has 
posted is a good example of proper JsOverlay usage as the constant "TAG" is 
not part of the underlying native object.

So I would consider it a bug/missing feature that you can not define native 
constants in a native JsType. IMHO the restriction checker should allow 
static final constant initialization in native JsType and if constant is 
not annotated with @JsOverlay then GWT should treat the constant name as 
native constant. The value to initialize the constant in java code should 
be ignored, as initialization only exists to make java happy. 

cc @goktug

-- J.

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

Reply via email to