Subj : Re: Rhino - How to return a function property from current stope, not prototype To : igor From : Ryan Breen Date : Fri Aug 27 2004 01:20 pm On Fri, 27 Aug 2004 18:03:26 +0200, Igor Bukanov wrote: > BTW, why do you need to support this? To emulate MSIE behavior in a > browser? If so, how do you define document and scope in your Java code? Yes, to emulate IE. This is a bit of JavaScript used to define the banner ad at the top of www.cnn.com. I have a host object for all the usual suspects -- document, window, navigator, html elements, etc. I create a top scope and defineClass each of these host objects into that scope. I then context.newObject a top level window from that scope and set its parent scope to null. That window is the parent scope for its document, which is created with context.newObject(ownerWindow, ...); Please let me know if you need more information, Ryan .