name: duk_get_prop_desc proto: | void duk_get_prop_desc(duk_context *ctx, duk_idx_t obj_idx, duk_uint_t flags); stack: | [ ... obj! ... key! ] -> [ ... obj! ... desc! ] (if property exists) [ ... obj! ... key! ] -> [ ... obj! ... undefined! ] (if property doesn't exist) summary: |
Equivalent of Object.getOwnPropertyDescriptor()
in the C API:
pushes a property descriptor object for a named property of the object at
obj_idx
. If the target is not an object (or the index is invalid)
an error is thrown.
No flags are defined yet, use 0 for flags
.