On Tue, Nov 17, 2015 at 6:44 AM, Arthur O'Dwyer <[email protected]> wrote: > There are at least two subquestions here, and of course any question can > "unpack" into as many little questions as you want. One subquestion is, how > do I use V8 to get the equivalent of "class name" or "constructor name", > i.e., what in Javascript might be spelled > (theValue.__proto__.constructor.name)? I might end up just writing a bit of > Javascript, compiling it with V8, and passing my V8 object to it; but it > would be nice if there were a way to do this through the C++ API.
v8::Object::GetConstructorName() > Another subquestion is, you wrote a 50-line function "getType" as part of > your reply; where can I find something like this function already written > and maintained for me? Obviously I don't want to write my own 50-line > function just to extract the type from a v8::Value; I want to call an API > method, something like theValue->GetType(). There is no such API function. The nearest thing is v8::TypeSwitch but that only works for objects created from FunctionTemplates. -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
