Closed dkocsis-emarsys closed 3 years ago
Thanks for reporting @dkocsis-emarsys! :slightly_smiling_face:
I will fix it as soon as possible. Probably tomorrow.
I have added a fix now :slightly_smiling_face:
You can read more about the release here: https://github.com/capricorn86/happy-dom/releases/tag/v2.9.0
You have a nice name by the way :slightly_smiling_face:
// David
Hi there!
First of all, this is an awesome library. I'm working with web-components so this is a great help for unit testing them!
However, I think I've found a bug where you can't pass an object as second parameter to the addEventListener function. It should call the object's handleEvent function with the event as a parameter.
Running this code from a browser console results a log, but doing the same in happy-dom's context will result an error:
TypeError listener is not a function
Have a nice day! David