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
Elment.attributes does not implement the NamedNodeMap interface #308
Comments
Hi @sondr! 🙂 Yes I will add support for this as soon as possible. This will probably come in pretty soon as it is fairly easy to implement support for. |
This is needed to support vue-test-utils (1.x) as it uses |
I ran into an issue related to this when running tests with axe-core. It looks like in their code there are a couple of if statements that do a check along the lines of: if (attributes instanceof window.NamedNodeMap) {
// ...
} This results in the error I think this is a little different to the original issue since this is concerning |
Code such as this in Jest tests:
Throw an error: |
This issue seems to be the last one preventing a drop-in replacement from |
I switched from jsdom to happy-dom for performance and jsdom lack of ESM. I can't get my nodejs program to run cross-platform without this feature. |
@capricorn86 Don't know if you've worked on this, otherwise I can help to write a PR. |
… some more unit tests.
#308@minor: Implement NamedNodeMap and use it for Element.attributes
Thank you contributing @jledentu! 🙂 There is a fix in now. You can read more about the release here: |
I was trying to replace JSDOM with Happy DOM and the app was failing to run something akin to:
I see the current implementation is:
Is there any chance there will be a switch to NamedNodeMap in the future?
The text was updated successfully, but these errors were encountered: