public string ToString()
{
// TODO if (!IsString)
// throw new NotImplementedException("JsVal.ToString() only supported when the type is String.");
using (AutoJSContext context = new AutoJSContext())
{
return Marshal.PtrToStringAnsi(JS_EncodeString(context.ContextPointer, Ptr));
}
}