On Jul 20, 7:35 am, Martin Blom <[email protected]> wrote: > And of course, DONTENUM can be used from JS too: > > var __dontenum__ = function (o, p) { > java.lang.Class.forName("org.mozilla.javascript.ScriptableObject") > .getMethod("setAttributes", java.lang.String, java.lang.Integer.TYPE) > .invoke(o, p, new java.lang.Integer( > org.mozilla.javascript.ScriptableObject.DONTENUM)); > > } > > On 07/20/2009 03:19 PM, Rapha wrote: > > > I'm working on implementing ES5 in Rhino. The Object.defineProperty is > > currently implemented in the CVS version, > > seehttp://www.mozilla.org/rhino/download.html > > > In the meantime you can add non-enumerable properties from Java, using > > the ScriptableObject.DONTENUM attribute. > > > On Jul 20, 1:15 am, Mark Porter<[email protected]> wrote: > >> Is there currently a way to define non-enumerable properties from > >> Javascript? Something like ES5's defineProperty? If not, are there > >> future plans to support this?
Wow, that is exactly what I needed. Thanks Rapha and Martin. Rapha, I'll try to follow your blog to keep up with your progress. Thanks, Mark ------------ Myna Server-Side Javascript: http://www.mynajs.org _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
