Javascript promise integration api allows suspending the Wasm computation until a promise from JS is resolved.