-
-
Notifications
You must be signed in to change notification settings - Fork 702
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
Calling util.inspect throws TypeError: element.getAttributeNames is not a function #1680
Comments
I did the tracing of some of the inner kinds of inspect calls from Tracing for the passing test
Tracing for the failing test
Looking at the trace from the bottom, we notice that the |
Yup cross realm stuff causes this We have to decide if to support it or not. We do support regexes cross realm so maybe it makes sense to do the same here. Just means slightly more complex code |
Hi @43081j thanks, for reaching out... I just found a simple change that at least prevents the error from being thrown. I'm preparing a PR for loupe right now |
An `HTMLCollection` assumes all items are `Element`s, a `NodeList` however may also include `Node`s such as `Text` and `Comment`, which does not include the `getAttributeNames` method. fixes chaijs/chai#1680
I found some incompatibility between chai, jsdom & iframes. This is a simple way to reproduce the issue:
Error:
TypeError: element.getAttributeNames is not a function
Package versions:
The text was updated successfully, but these errors were encountered: