From: Marc G. <mgu...@ya...> - 2005-08-17 07:29:53
|
I guess that these functions are not yet implemented in htmlunit. Please open a feature request issue for this. Marc. Gregory Mcshea wrote: > Hi, > > I'm new to HTML Unit. The application I am testing makes heavy use of > javascript in libraries. When accessing a page in my application I am > receiving the following error when the onload is executed: > > com.gargoylesoftware.htmlunit.ScriptException: TypeError: > addEventListener is not a function. (/test/mainlib.js#3800) > > This happens when simulating the Mozilla agent. I receive a similar > error for attachEvent if simulating the IE agent. The addEventListener > call causing the error is in a for loop that iterates through an array > of events adding a listener for each event like this: > > for(var a=0;a<13;a++) > { > HTMLDocument.addEventListener(eventlist[a],fname,false); > } > > Any ideas on why HTML Unit is throwing this error? The javascript works > fine when run in the browsers themselves. > > Thanks, > Greg |