JSValue.newAtomLenStr constructor

JSValue.newAtomLenStr(
  1. JSContext _ctx,
  2. String str, {
  3. bool autoDispose = true,
})

JS_NewAtomLen

Implementation

JSValue.newAtomLenStr(this._ctx, String str, {bool autoDispose = true}) {
  _str = str.toNativeUtf8();
  _ref = nullptr;
  _atom = JS_NewAtomLen(_ctx.ref, _str!, str.length);
  attach(Q_JS_FreeValueAddress.cast(), _ref.cast(), autoDispose: autoDispose);
}