I have followed the Rhino examples and sucessfully added Host objects into 
JS by using the jsGet_foo() {... } syntax.

So now I can do  hostObject.foo in the JS.

However I am am wondering how I make it enumerable to the JS environment. eg

for (var x in hostObject) {
    s += hostObject[x]
}

By default the properties are not set.  I have played around with 
ScritpableObject.defineProperty() and ScritpableObject.setAttribute() but I 
am not getting the results I am after.

I want the getter and setter to be the java object itself but I want the JS 
environment to be able to enumerate my host properties.

I think I am close but I seem to be approaching it wrong.

Cheers
Brad Baker
Atlassian



_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to