Re: Can we define a method name alias when using a Java object/class form Nashorn?

2017-03-09 Thread Jim Laskey (Oracle)
You might consider using an ordinary JS object to wrap the Java Promise Object. Even though the wrapper exists, the indirection should eventually optimize out (more so than for JSObject.) As far as having more objects about, I think it’s small relative to other objects in the background

Can we define a method name alias when using a Java object/class form Nashorn?

2017-03-09 Thread Paulo Lopes
Hi, For the Vert.x project I've created a simple Promise implementation as available in a Browser. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise I've then played with babel to transpile the ES7 async - await to Promises and I must say that it works