0

JSAPI provide function JS_GetProperty to get specified property name's value but how to get them as name list / all properties name ?

found similar issue on link below https://groups.google.com/forum/?fromgroups#!topic/mozilla.dev.tech.js-engine/usHtJn4LR7A

Thank you very much ,sir

Denny
  • 449
  • 4
  • 17

1 Answers1

0

There are two ways to approach this. The older JS_Enumerate function or the combination of JS_NewPropertyIterator and JS_NextProperty. I would recommend the latter, because you don't have to mess around with the jsid array yourself.

evilpie
  • 2,718
  • 20
  • 21
  • I try with JS_NewPropertyIterator/JS_NextProperty it will return JSID , but I want all property name of the object . Please advise me more , than you very much – Denny Jun 17 '13 at 04:35