obtain primitive string value from CevV8Value object

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

obtain primitive string value from CevV8Value object

Postby dpaul » Tue Dec 06, 2022 12:26 pm

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
dpaul
Newbie
 
Posts: 2
Joined: Tue Dec 06, 2022 11:23 am

Re: obtain primitive string value from CevV8Value object

Postby dpaul » Tue Dec 06, 2022 4:03 pm

I figured out I can call GetValue("toString") to get a function object and proceed from there.
dpaul
Newbie
 
Posts: 2
Joined: Tue Dec 06, 2022 11:23 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 31 guests

cron