When I drop in prototype 1.5.0 and test my pages with JWebUnit, it throws this error:
======= EXCEPTION START ========
EcmaError: lineNumber=[1604] column=[0] lineSource=[ copy(Form.Methods, HTMLFormElement.prototype);] name=[TypeError] sourceName=http://localhost:8080/scripts/prototype-1.5.0.js message=[TypeError: Cannot read property "prototype" from null (http://localhost:8080/scripts/prototype-1.5.0.js#1604)]
com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "prototype" from null (http://localhost:8080/scripts/prototype-1.5.0.js#1604)
The problem appears to be around the anonymous block at line 1604. If I comment it out all works fine - I'm not using that method in my code so it's going away doesn't break anything for me. Just thought the devs should know.