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

Demix ParentNode.childElementCount #3372

Merged
merged 5 commits into from
Mar 23, 2021

Conversation

Elchi3
Copy link
Member

@Elchi3 Elchi3 commented Mar 22, 2021

The IDL for childElementCount is this:

interface mixin ParentNode {
  readonly attribute unsigned long childElementCount;
};

Document includes ParentNode;
DocumentFragment includes ParentNode;
Element includes ParentNode;

Therefore we need these pages (created in this PR):
http://localhost:3000/en-US/docs/Web/API/Document/childElementCount
http://localhost:3000/en-US/docs/Web/API/DocumentFragment/childElementCount
http://localhost:3000/en-US/docs/Web/API/Element/childElementCount

Currently existing is: https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/childElementCount
(I made that a redirect to http://localhost:3000/en-US/docs/Web/API/Element/childElementCount which is the oldest/original API.)

This note was fun (I removed it). ElementTraversal seems to be the old mixin here. Neither ElementTraversal nor ParentNode are really interesting to readers as the note points out.

This property was initially defined in the ElementTraversal pure interface. As this interface contained two distinct set of properties, one aimed at Node that have children, one at those that are children, they have been moved into two separate pure interfaces, ParentNode and ChildNode. In this case, childElementCount moved to ParentNode. This is a fairly technical change that shouldn't affect compatibility.

@Elchi3 Elchi3 requested review from a team as code owners March 22, 2021 15:04
@Elchi3 Elchi3 requested review from chrisdavidmills and removed request for a team March 22, 2021 15:04
@sideshowbarker sideshowbarker merged commit a36c4da into mdn:main Mar 23, 2021
@Elchi3 Elchi3 deleted the parentnode-childelementcount branch March 23, 2021 09:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants