QuickJsContext constructor

QuickJsContext(
  1. QuickJsFFI _ffi,
  2. Pointer<Void> _runtimeHandle
)

Implementation

QuickJsContext(this._ffi, this._runtimeHandle)
  : _handle = _ffi.createContext(_runtimeHandle) {
  _ffi.initDefaultBindings(_handle);
  instances[_handle.address] = this;
  final globalRes = _ffi.getGlobalObject(_handle);
  global = JSObject(this, globalRes);
}