3 ms·
"I haven't found a way to do promises yet". TeaVM provides Java wrappers for most JS APIs, including promises (https://github.com/konsoletyper/teavm/blob/maste
by shannah78 6y ago
"I haven't found a way to do promises yet". TeaVM provides Java wrappers for most JS APIs, including promises (https://github.com/konsoletyper/teavm/blob/master/core/src/main/java/org/teavm/common/Promise.java https://github.com/konsoletyper/teavm/blob/master/core/src/m...). If you require an API that doesn't have a wrapper yet, it is dead simple to create your own wrapper. Or just use the @JSBody annotation to write your own ad-hoc Javascript.
- pojntfx 6y agoThanks for the link! This looks like a significant improvement over my current solution of trying to pass callbacks ... which aren’t transferable types sadly ;)