IE handles events differently from firefox. In IE, the
event is stored in window.event, where in firefox the
event is passed as a parameter to the handler. IE
passes a null in this parameter.
The window.event object is described in the MSDN as per
here
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp
Work involved would be to register each event generated
by clicks/keypresses and register it with a window. A
call to window.event would get the most recent
(current) event.
Logged In: YES
user_id=402164
What is currently wrong in htmlunit? If I correctly
understand your description, when simulating IE:
- event should be placed as window.event
- no parameter should used for event handler call
Is it correct? Can you provide a unit test?
Logged In: YES
user_id=1269316
See here for a better description of the microsoft event
handling way. http://www.quirksmode.org/js/events_access.html
The event should be placed into window.event, and yes,
internet passes a null as a parameter for an event handler.
See patch for unit test.
better JUnit test for window.event handling behaviour
html for junit test, passes in IE
Logged In: YES
user_id=402164
I've adapted the unit test a bit and added it as
notYetImplemented: EventTest.testEventTransmission. I
couldn't fix it now because somehow the variable visibility
was not exactly what I've expected. I have to take more time
to check it.
Logged In: YES
user_id=402164
Now fixed in CVS