Skip to content
New issue

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

Typo in addEventListener function line 2514 (on version 2.0.4) #3179

Open
mdinsmore opened this issue Feb 10, 2025 · 3 comments · May be fixed by #3188
Open

Typo in addEventListener function line 2514 (on version 2.0.4) #3179

mdinsmore opened this issue Feb 10, 2025 · 3 comments · May be fixed by #3188
Labels
bug Something isn't working

Comments

@mdinsmore
Copy link

There is a typo in the function expression eventListener declared within the function addEventListener

Line 2514 (on version 2.0.4) reads:

const node = event.target

but should read:

const node = evt.target

The variable event is not defined in this function

@Telroshan
Copy link
Collaborator

That's indeed likely not intended, feel free to open a bugfix PR if you are interested!

@Telroshan Telroshan added the bug Something isn't working label Feb 10, 2025
@MichaelWest22
Copy link
Contributor

https://developer.mozilla.org/en-US/docs/Web/API/Window/event

It is likely this is just a mistake and it should probably be evt.target. All browsers currently have a window scoped object called event available in all event handlers which is why the current code works and tested fine. So while the code does not need to change the use of window.event is depreciated so should probably still be corrected.

@JacobMonticello JacobMonticello linked a pull request Feb 14, 2025 that will close this issue
4 tasks
@JacobMonticello
Copy link

Didn't seem like anyone was gonna take this, opened a PR here: #3188

@Telroshan Telroshan linked a pull request Feb 14, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants