HandlePromises extension

Promise handling without Timer.periodic polling of JS query helpers.

QuickJS converts JS Promises to Dart Future in _jsToDart. Awaiting that Future and pumping JavascriptRuntime.executePendingJob is enough.

on

Methods

enableHandlePromises() → void

Available on JavascriptRuntime, provided by the HandlePromises extension

Optional no-op friendly setup for callers that still invoke this.
handlePromise(JsEvalResult value, {Duration? timeout}) Future<JsEvalResult>

Available on JavascriptRuntime, provided by the HandlePromises extension