Page 1 of 1

obtain primitive string value from CevV8Value object

PostPosted: Tue Dec 06, 2022 12:26 pm
by dpaul
I'm wondering if there is an efficient way to obtain the primitive string value from a CefV8Value where "IsString" returns false, "IsObject" returns true, and the object is a String. I can obtain the length using the GetValue(L"length") and then individual string CefV8Values for each character using "GetValue(0)", "GetValue(1)", etc but this seems wildly inefficient. I've tried calling GetValue using variations on "PrimitiveValue" with no success. Is there a way I can call the object's "toString" function from native code, for example?

Thank you

Re: obtain primitive string value from CevV8Value object

PostPosted: Tue Dec 06, 2022 4:03 pm
by dpaul
I figured out I can call GetValue("toString") to get a function object and proceed from there.