-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Element.getAttributeNames() does not match browser behavior #1728
Comments
Thank you for reporting @titouanmathis! 🙂 There is a fix in now. |
After updating to the 17.1.3 version, I now get this error when executing tests in a vite react application: It seems like the error is caused by |
After updating to I haven't tried to reproduce it in a minimal sample yet. EDIT: We now know that the issue is caused by cloning a node using |
Describe the bug
The
Element.getAttributeNames()
in happy-dom v16 and v17 does not return the same values as browsers. It is working as expected in happy-dom v15.To Reproduce
Try the following snippet in a browser console (tested in Firefox 135, Chrome 133 and Safari 18 on macOS):
I also added a failing test in a fork: titouanmathis@8fba4af.
Expected behavior
happy-dom should return the same attributes as the browser when using the
Element.getAttributeNames()
method.Screenshots
Not relevant.
Device:
Additional context
Bug encountered in a vitest environment.
The text was updated successfully, but these errors were encountered: