We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Came across this issue while trying to get HTM + Preact working with Happy DOM:
import {GlobalRegistrator} from '@happy-dom/global-registrator'; GlobalRegistrator.register(); const button = document.createElement('button'); button.textContent = 'A Button'; button.addEventListener('click', function () { console.log(this === undefined, this.textContent); // Results in: TypeError: Cannot read properties of undefined (reading 'textContent') }); button.click();
The text was updated successfully, but these errors were encountered:
#415@patch: Fixes bug where event listeners wasn't called in the scop…
5f1efe9
…e of the EventTarget when calling EventTarget.dispatchEvent().
Merge pull request #416 from capricorn86/task/415-this-is-undefined-i…
156cea3
…n-event-listeners #415@patch: Fixes bug where event listeners wasn't called in the scop…
Thank you for reporting @Bauke! 🙂
I have fixed the bug.
You can read more about the release here: https://github.com/capricorn86/happy-dom/releases/tag/v2.47.3
Sorry, something went wrong.
capricorn86
Successfully merging a pull request may close this issue.
Came across this issue while trying to get HTM + Preact working with Happy DOM:
The text was updated successfully, but these errors were encountered: