You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Element.firstElementChild read-only property returns an element's first child Element, or null if there are no child elements.
Element.firstElementChild includes only element nodes. xmldom only implements Node.firstChild, that return all the child nodes, including non-element nodes like text and comment nodes.
The text was updated successfully, but these errors were encountered:
I guess when talking about one method in this realm, it would mean that people would also expect lastElementChild, childElementCount, nextElementSibling, previousElementSibling to be available. And maybe even getElementsBy... methods.
It will not be the highest priority by the maintainers, but it will also not be rejected.
It's related to the discussion regarding supporting more things from the living standard #176 and also regarding providing the correct actual types #285 instead of relying on the ones from typescript.
@KevinYeramian anything that is aligned with the spec and is not requiring major rewrites or new dependencies is always welcome.
You can always expect feedback and suggestions how to improve the contribution, but most likely no substantial code contributions by maintainers.
And we will expect unit tests for every new API including those for edge cases.
Ideally you can provide small chunks of changes/multiple focused PRs, so reviewing each is easier for us.
In this case maybe adding useful pairs of APIs.
https://developer.mozilla.org/en-US/docs/Web/API/Element/firstElementChild
The
Element.firstElementChild
read-only property returns an element's first childElement
, ornull
if there are no child elements.Element.firstElementChild
includes only element nodes.xmldom
only implementsNode.firstChild
, that return all the child nodes, including non-element nodes like text and comment nodes.The text was updated successfully, but these errors were encountered: