"const" doesn't define a property in the global object. Does it work if you use "var K" instead of "const K"?
On Fri, Jul 3, 2020, 12:02 <[email protected]> wrote: > I compile & run this string "const K = {a: 1, b: 2}; " >>> But when I try to get properties of object K , I got *undefined *at >>> val_k , Any idea why ? >>> >>> v8::Local<v8::Object> global_obj = m_Context->Global(); >>> Local<Value> val_k = global_obj->Get(m_Context, >>> v8::String::NewFromUtf8(m_Isolate, "K")).ToLocalChecked(); >>> >>> Attached sample that reproduce it >>> >>> Thanks >>> Oren >>> >> -- > -- > v8-dev mailing list > [email protected] > http://groups.google.com/group/v8-dev > --- > You received this message because you are subscribed to the Google Groups > "v8-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/v8-dev/5610ff0d-acc1-4d95-9b91-272301386307o%40googlegroups.com > <https://groups.google.com/d/msgid/v8-dev/5610ff0d-acc1-4d95-9b91-272301386307o%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CAED6dUBTjhkEAojJZTm3SRcOz3TUx2nRCRog06LD9GAOWX_Wvg%40mail.gmail.com.
