MCPcopy Create free account
hub / github.com/FongMi/TV / then

Method then

quickjs/src/main/java/com/fongmi/quickjs/utils/Async.java:56–64  ·  view source on GitHub ↗
(JSObject promise)

Source from the content-addressed store, hash-verified

54 }
55
56 private void then(JSObject promise) {
57 JSFunction then = promise.getJSFunction("then");
58 if (then == null) {
59 future.complete(promise);
60 } else {
61 consume(then, success);
62 consume(promise.getJSFunction("catch"), error);
63 }
64 }
65
66 private void consume(JSFunction func, JSCallFunction callback) {
67 if (func == null) return;

Callers 2

callMethod · 0.95
jquery.min.jsFile · 0.80

Calls 1

consumeMethod · 0.95

Tested by

no test coverage detected