-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Use webidl2js named/indexed properties everywhere #1129
Comments
Some are marked as
(but not This means that the named properties will shadow any property (e.g. toString, attributes, firstChild, proto). This will break a lot. For this to work, jsdom must only use getters/setters/methods that are not exposed (for example, everything protected by symbols). IMO, this part of the spec is completely insane and I would rather pretend |
I think it is okay to do it for |
Yeah, I'd be happy leaving |
Renamed and updated OP in light of #1934! |
An update: NodeList and HTMLCollection now use webidl2js. NamedNodeMap (used for element.attributes) was moved to webidl2js, but Proxy performance was then found to be too slow for NamedNodeMap. DOMTokenList has been implemented in jsdom, but has not been transitioned yet. It's on my radar though. Additionally, DOMStringMap (used for element.dataset) and HTMLOptionsCollection (a la selectElement.options) have been implemented. |
Thanks, updated OP further. I misremembered about NodeList. |
This also switches the ownership of "attribute list" and the associated cache to Element, which is a more literal reading of the spec and simplifies things here in jsdom. Part of #1129.
Now that we have support for named and indexed properties, we should figure out how to use them everywhere---while not regressing performance.
Existing collections implemented in jsdom, to update
There's also Window, but that's a whole bunch more work, as it needs a special named properties object, and performance is likely to be even more delicate.
New collections we can now implement
The text was updated successfully, but these errors were encountered: