IsolateQjs class

Constructors

IsolateQjs({_JsAsyncModuleHandler? moduleHandler, JsModuleBundle? bundle, Map<String, String>? moduleSources, int? stackSize, int? timeout, int? memoryLimit, _JsHostPromiseRejectionHandler? hostPromiseRejectionHandler})
Quickjs engine runing on isolate thread.

Properties

bundle JsModuleBundle?
Modules compiled to bytecode ahead of time. They are registered in the worker's context before the first evaluate, so imports of their names resolve locally: no moduleHandler round trip, no parked worker, and no per-module parse cost at runtime.
final
hashCode int
The hash code for this object.
no setterinherited
hostPromiseRejectionHandler → _JsHostPromiseRejectionHandler?
Handler function to manage js module.
final
memoryLimit int?
Max memory for quickjs.
final
moduleHandler → _JsAsyncModuleHandler?
Asynchronously handler to manage js module.
final
moduleSources Map<String, String>?
Module sources the worker resolves on its own, as a fallback for graphs that are known but not precompiled. Cheaper than moduleHandler (no round trip) but still parses on every load; bundle is the faster option.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackSize int?
Max stack size for quickjs.
final
timeout int?
Max stack size for quickjs.
final

Methods

close() Future?
Free Runtime and close isolate thread that can be recreate when evaluate again.
evaluate(String command, {String? name, int? evalFlags}) Future
Evaluate js script.
evaluateBundleEntry() Future
Evaluate the entry module of bundle in the worker.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setHostFunctions(Map<String, Function> functions) → void
Register host functions callable from JS as globalThis[name](...).
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited