stringCopy property

JSString get stringCopy

Converts a JavaScript value to string and copies the result into a JavaScript string. exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.

Implementation

JSString get stringCopy {
  final JSException exception = JSException.create(context);
  final JSStringRef stringRef = JSValueToStringCopy(
    context.ref,
    _ref,
    exception.ref,
  );
  if (exception.shouldThrow) throw exception.error;
  return JSString(stringRef);
}