The folks at Funkyworker have an API that nicely sidesteps the type unsafety of the JS Promise API: https://github.com/funkywork/nightmare/blob/main/lib/js/promise.mli (see also https://github.com/funkywork/nightmare/blob/main/lib/js/stubs/caml_promise_stubs.js)
Should we consider including it in Js_of_ocaml? I hear that they would be fine with this copyright-wise.
Having a Promise API would also unlock #596.