HtmlUnit relies on Mozilla’s Rhino for the JavaScript execution. Rhino is “just” a JavaScript engine which means that HtmlUnit has to “tell” him of all objects used inthe context of a web page like Window, Document, Navigator, …
Until now HtmlUnit misused Rhino by configuring some host objects when it was not needed and catching property and method access rather than letting Rhino work with the previously configured information. This made quite difficult to understand how the js code was interpreted and caused some bugs, therefore we wanted to fix this since a long long time.
I’ve committed last Friday the main changes for a better Rhino usage. Scriptable#put still needs to be improved and some clean-up is now needed but this was the decisive step and our future JavaScript improvements should now be easier to implement.

