Subj : Re: Embedding Parameters To : gonzalo From : Igor Bukanov Date : Mon Apr 14 2003 02:41 pm gonzalo wrote: > Igor Bukanov wrote in message news:<3E9582B4.2000008@fastmail.fm>... > >>gonzalo wrote: >> >>>Now, we DONT KNOW how to: >>> * capture the setting of a property (obj.style.cursor = 'hand'; (JS >>>code)) >> >>I assume here obj points to some DOM element, but then your DOM >>implementation should support getStyle() method which Rhino via >>reflection will map to obj.style property etc. > > > > This isn't very clear. What we need is to handle the setting of a > property. Imagine my Java object Document (extends Scriptable object) > has a propery called myProperty. In the JS code is written > document.myProperty = 'something'; > What method is rhino going to call on my Document object, while > interpreting that code? how am i going to "see" this 'something' > value. For that Rhino invokes the Scriptable.put method which you will need to implement as a part of Scripatble implementation. See API docs for that class. Note that Rhino always use the Scriptable interface to access properties, so providing your own implementation of the interface should give you a full control over object properties. Regards, Igor .