What steps will reproduce the problem?
1. create a web application the uses iScroll
2. write acceptance tests for application that use htmlunit
3. htmlunit doesn't support addEventListner with an object so it throughs an exception
Expected output is passing tests
We see an exception.
Version 3.7.1 - Last updated: 2010.10.08.
Here is the fix from around line 60
var eventHandler = function(e) {
that.handleEvent(e);
};
window.addEventListener('onorientationchange' in window ? 'orientationchange' : 'resize', eventHandler, false);
if (isTouch || that.options.desktopCompatibility) {
that.element.addEventListener(START_EVENT, eventHandler, false);
that.element.addEventListener(MOVE_EVENT, eventHandler, false);
that.element.addEventListener(END_EVENT, eventHandler, false);
}
if (that.options.checkDOMChanges) {
that.element.addEventListener('DOMSubtreeModified', eventHandler, false);
}