I am not sure whether this issue was raised before
when a variable/funname was accidentally chosen a name
overlaps with a "keyword", like "scroll" "navigator",
HTMLUNIT will fail.
actually in most browser's implementation, overwriting
of internal function is allowed. ie.
function alert(){ scroll = "xxx"; document.write(scroll); } function navigator(){ alert("xxx"); }
the aboves can be executed in most of the browsers
without any problem.
Logged In: YES
user_id=402164
Originator: NO
Added unit test com.gargoylesoftware.htmlunit.javascript.host.WindowTest#testOverwriteFunctions() as notYetImplemented()
Logged In: YES
user_id=402164
Originator: NO
Added unit test com.gargoylesoftware.htmlunit.javascript.host.WindowTest#testOverwriteFunctions() as notYetImplemented()
Logged In: YES
user_id=1109422
Originator: NO
https://bugzilla.mozilla.org/show_bug.cgi?id=443491
Logged In: YES
user_id=1109422
Originator: NO
This has been fixed in the latest Rhino builds (both Rhino proper and the HtmlUnit fork). Should be included with HtmlUnit 2.2.
Diff: