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, see
http://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?
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino