C++ API getOwnPropertyNames?
Kent Williams <[email protected]> Tue, 23 Aug 2016 15:29:35 -0500
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <[email protected]> |
Here's what I'm trying to do:
Given an JSObject, can I get the names of its properties?
Extra credit -- this is with an obsolete version of Spidermonkey (1.8.5)
Use case: Inside a JSNative function we look for properties in an
optional argument.
EG a JS_Native function takes one string argument, and an optional property:
var X = FindSomething_JSNative("a", { "look_really_hard" });
If none of the expected properties are defined, I want to print an error
message giving the name of the unrecognized properties.