-
Notifications
You must be signed in to change notification settings - Fork 79
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
classList property of elements is not populated #65
Comments
"By eye" I see (at least) two sources of leakage - The following workaround is necessary before any read of classList:
Note that being implemented in terms of a Set, the classList does not perfectly conform to the DOM API describing a "DOMTokenList" - e.g. it is missing a "length" property. Given that the developer has said that the target is only for linkedom to be "close" to the DOM API this may not be terribly important, since I guess it is still usable in spread contexts and via a few of its advertised named methods, but I think it should be kept in sync with the value imputed by "class". |
Why do you use |
@amb26 never mind ... I think I've found a decent compromise to make it work. Fixed, thanks. |
I can see that there is a placeholder for this since the property is attached but it is always populated with a Set of 0 elements, regardless of whether there is a "class" attribute on the element or not.
Specified in the DOM API here: https://developer.mozilla.org/en-US/docs/Web/API/Element/classList
See attached image showing classList as Set(0) even though there is an class attribute holding value
![classList](https://user-images.githubusercontent.com/561418/120032362-fbf39400-bff1-11eb-915d-60250661a383.png)
renderer-test-container
The text was updated successfully, but these errors were encountered: