My favorites | Sign in
Project Home Downloads Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 46: iScroll doesn't work in htmlunit
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by matthew....@gmail.com, Feb 8, 2011
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);
	}



Powered by Google Project Hosting