Re: How to defineObject with name, proto and parent (spidermonkey 60)
Jason Orendorff <[email protected]> Tue, 20 Aug 2019 08:23:05 -0500
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <CA+W3DWGoshCQbLohkUf3LAzOQxib_pBqS0_nwpMpjs2cH9DdVw@mail.gmail.com> |
On Tue, Aug 20, 2019 at 7:20 AM msami <[email protected]> wrote: > I want to define JSObject* on context and access it as if I evaluated > script like that var object1={ x:1,y:5}; > Create the object with JS_NewObject(cx, null), store it in a local JS::RootedObject variable, define each property on it, then define a property named "object1" on the global. I don't know a more convenient way. -j