Skip to content
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

feat: add DOM level 4 child element properties #652

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dmitri-gb
Copy link

Hey!

Since #398 seems to be stale and apparently no longer being worked on by the original author, I figured I'd make another attempt.

This PR adds the following properties to Element nodes:

  • childElementCount
  • firstElementChild
  • lastElementChild
  • nextElementSibling
  • previousElementSibling

These properties correspond to the attributes defined in the ParentNode and NonDocumentTypeChildNode mixins in the DOM Living Standard.

The first three of these properties are also added to Document and DocumentFragment.

This adds the properties childElementCount, firstElementChild,
lastElementChild, nextElementSibling and previousElementSibling to
Element. The first three are also added to Document and
DocumentFragment.
Copy link

codecov bot commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.38%. Comparing base (898e0e2) to head (9cc3098).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #652      +/-   ##
==========================================
+ Coverage   94.27%   94.38%   +0.10%     
==========================================
  Files           8        8              
  Lines        2096     2119      +23     
  Branches      537      544       +7     
==========================================
+ Hits         1976     2000      +24     
+ Misses        120      119       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant