Community: 
     I'm playing with JsInterop , and I have two questions: 

     1) Are you planning to try the static methods of JS objects, such as 
Object, Promise, etc.? 
     2) How do when an instance is mapped to an existing Object, eg 
Promise, has a constructor with parameters? 
  
    Currently to resolve this 1) I created the following class Factory: JS 
<https://github.com/workingflows/gwt-jscore/blob/master/src/main/java/com/workingflows/js/jscore/client/factory/JS.java>

    But the interfaces define a contract at the level instance of a class 
or object, this way of doing things, I do not know if it is semantically 
correct. 

   To solve 2) there are not many options: 

     Create a Factory that returns an instance of the object, because it 
has no meaning, only to make the new, implement the interface, because the 
compiler already does. 
     There is some progress in this? 

     I saw in one of the post a proposal to do something like this: 
 
     Promise Promise.Prototype p = new (new Function ....., new Function 
....);

    Where Promise, is the interface defined with prototype = "Promise". 

    @JsType(isNative = true, prototype = "Promise")
    public interface Promise {
   
      void then(Function f);
    
      void cath(Function f);
  }

    Here 'access to jsCore project: 
  
    https://github.com/workingflows/gwt-jscore/ 
<https://github.com/workingflows/gwt-jscore/>

I hope the answers ... 

greetings

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/3268ccc7-9953-49c9-9079-574096f0d5d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to