How to export js generated from Java

64 views
Skip to first unread message

David

unread,
Sep 15, 2024, 1:47:39 AMSep 15
to GWT Users
I want 
     1.   "@JsType(isNative = false, name = "JsEmail", namespace = JsPackage.GLOBAL)"  generate JS.
     2.  bind "JsEmail" into Window object so I can see Window.JsEmail during Chrome inspect.
     3. In pure js environment, I can use JsEmail.someMethod() directly.

I appreciate your help.

David

Craig Mitchell

unread,
Sep 15, 2024, 3:53:57 AMSep 15
to GWT Users
Yes, you can do all this.  I'm not sure what your question is.  Maybe the JsInterop docs will help:  https://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJsInterop.html

Thomas Broyer

unread,
Sep 15, 2024, 2:01:18 PMSep 15
to GWT Users
You need to opt-in by passing -generateJsInteropExports to the GWT compiler though
Reply all
Reply to author
Forward
0 new messages