logo       

[HtmlUnit] [ htmlunit-Feature Requests-1277542 ] attachEvent not defined in: msg#00043

java.htmlunit.devel

Subject: [HtmlUnit] [ htmlunit-Feature Requests-1277542 ] attachEvent not defined in JavaScriptConfiguration.xml

Feature Requests item #1277542, was opened at 2005-08-31 10:59
Message generated for change (Comment added) made by yourgod
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448269&aid=1277542&group_id=47038

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Ben Kyrlach (bkyrlach)
Assigned to: Nobody/Anonymous (nobody)
Summary: attachEvent not defined in JavaScriptConfiguration.xml

Initial Comment:
The IE only JavaScript function {element}.attachEvent()
is not currently supported by HTMLUnit 1.7. There is no
definition for it in the JavaScriptConfiguration.xml file for
any of the element types. This causes HTMLUnit to
throw exceptions, even if the browser emulation is set
such that the offending code should never run (because
of browser detection in the javascript).

----------------------------------------------------------------------

>Comment By: Brad Clarke (yourgod)
Date: 2006-03-22 16:04

Message:
Logged In: YES
user_id=257129

While that solution would work for extremely simple cases,
addEventListener and attachEvent both exist so multiple
event handlers can be assigned at once, which would be no
small change to HtmlUnit.

----------------------------------------------------------------------

Comment By: Mike D (denance)
Date: 2005-11-15 08:37

Message:
Logged In: YES
user_id=732813

I added the following code to HTMLElement.java (and the
corresponding entry in JavaScriptConfiguration.xml) to add
support for addEventListener. The same code could likely be
used for this event support

public void jsxFunction_addEventListener(final String
type, final Function handler, final Boolean useCapture) {
getHtmlElementOrDie().setEventHandler("on"+type,
handler);
}

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448269&aid=1277542&group_id=47038


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise