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.{append,prepend} to Element, Document, DocumentFragment pages #4163

Merged
merged 8 commits into from
Apr 16, 2021

Conversation

Elchi3
Copy link
Member

@Elchi3 Elchi3 commented Apr 16, 2021

Before:
https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/append
https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/prepend

After:
https://developer.mozilla.org/en-US/docs/Web/API/Element/append
https://developer.mozilla.org/en-US/docs/Web/API/Document/append
https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment/append

https://developer.mozilla.org/en-US/docs/Web/API/Element/prepend
https://developer.mozilla.org/en-US/docs/Web/API/Document/prepend
https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment/prepend

IDL:

interface mixin ParentNode {
  [CEReactions, Unscopable] undefined prepend((Node or DOMString)... nodes);
  [CEReactions, Unscopable] undefined append((Node or DOMString)... nodes);
};
Document includes ParentNode;
DocumentFragment includes ParentNode;
Element includes ParentNode;

I didn't really know what example to make for the Document.{append,prepend} methods. Let me know if there is a better use case.

@Elchi3 Elchi3 requested review from a team as code owners April 16, 2021 10:43
@Elchi3 Elchi3 requested review from chrisdavidmills and removed request for a team April 16, 2021 10:43
@Elchi3 Elchi3 force-pushed the demix-parentnode-append-prepend branch from 087c239 to 66f70d4 Compare April 16, 2021 12:02
@github-actions
Copy link
Contributor

Preview URLs

Flaws

URL: /en-US/docs/Web/API/Document
Title: Document
on GitHub
Flaw count: 162

  • macros:
    • wrong xref macro used (consider changing which macro you use)
    • wrong xref macro used (consider changing which macro you use)
    • wrong xref macro used (consider changing which macro you use)
    • wrong xref macro used (consider changing which macro you use)
    • wrong xref macro used (consider changing which macro you use)
    • and 133 more flaws omitted
  • broken_links:
    • Can't resolve /en-US/docs/XUL_Overlays
  • bad_bcd_links:
    • no explanation!
    • no explanation!
    • no explanation!
    • no explanation!
    • no explanation!
    • and 18 more flaws omitted

URL: /en-US/docs/Web/API/Document/prepend
Title: Document.prepend()
on GitHub
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/HierarchyRequestError does not exist
    • /en-US/docs/Web/API/HierarchyRequestError does not exist

URL: /en-US/docs/Web/API/Document/append
Title: Document.append()
on GitHub
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/HierarchyRequestError does not exist
    • /en-US/docs/Web/API/HierarchyRequestError does not exist

URL: /en-US/docs/Web/API/ChildNode/after
Title: ChildNode.after()
on GitHub
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/HierarchyRequestError does not exist

URL: /en-US/docs/Web/API/ChildNode/before
Title: ChildNode.before()
on GitHub
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/HierarchyRequestError does not exist

URL: /en-US/docs/Web/API/DocumentFragment
Title: DocumentFragment
on GitHub
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/DocumentFragment/getElementById does not exist
  • bad_bcd_links:
    • no explanation!

URL: /en-US/docs/Web/API/DocumentFragment/prepend
Title: DocumentFragment.prepend()
on GitHub
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/HierarchyRequestError does not exist

URL: /en-US/docs/Web/API/DocumentFragment/append
Title: DocumentFragment.append()
on GitHub
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/HierarchyRequestError does not exist

URL: /en-US/docs/Web/API/Element
Title: Element
on GitHub
Flaw count: 5

  • macros:
    • /en-us/docs/web/api/animatable (url: /en-US/docs/Web/API/Animatable) does not exist
    • /en-US/docs/Web/API/GlobalEventHandlers/onshow does not exist
  • bad_bcd_links:
    • no explanation!
    • no explanation!
    • no explanation!

URL: /en-US/docs/Web/API/Element/prepend
Title: Element.prepend()
on GitHub
Flaw count: 2

  • macros:
    • /en-us/docs/web/api/animatable (url: /en-US/docs/Web/API/Animatable) does not exist
    • /en-US/docs/Web/API/HierarchyRequestError does not exist

URL: /en-US/docs/Web/API/Element/append
Title: Element.append()
on GitHub
Flaw count: 2

  • macros:
    • /en-us/docs/web/api/animatable (url: /en-US/docs/Web/API/Animatable) does not exist
    • /en-US/docs/Web/API/HierarchyRequestError does not exist

URL: /en-US/docs/Web/API/XMLSerializer
Title: XMLSerializer
on GitHub
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/XMLSerializer/serializeToStream does not exist
    • /en-US/docs/Web/API/Document/insertAdjacentElement does not exist

URL: /en-US/docs/Web/API/ParentNode/replaceChildren
Title: ParentNode.replaceChildren()
on GitHub
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/HierarchyRequestError does not exist
  • bad_bcd_queries:
    • No BCD data for query: api.ParentNode.replaceChildren

URL: /en-US/docs/Web/API/Node/insertBefore
Title: Node.insertBefore()
on GitHub
Flaw count: 1

  • bad_pre_tags:
    • <pre><code>CODE can be just <pre>CODE

URL: /en-US/docs/Web/API/Node/appendChild
Title: Node.appendChild()
on GitHub

No flaws! 🎉

External URLs

URL: /en-US/docs/Web/API/Document
Title: Document
on GitHub


URL: /en-US/docs/Web/API/Document/prepend
Title: Document.prepend()
on GitHub


URL: /en-US/docs/Web/API/Document/append
Title: Document.append()
on GitHub


URL: /en-US/docs/Web/API/ChildNode/after
Title: ChildNode.after()
on GitHub


URL: /en-US/docs/Web/API/ChildNode/before
Title: ChildNode.before()
on GitHub


URL: /en-US/docs/Web/API/DocumentFragment
Title: DocumentFragment
on GitHub


URL: /en-US/docs/Web/API/DocumentFragment/prepend
Title: DocumentFragment.prepend()
on GitHub


URL: /en-US/docs/Web/API/DocumentFragment/append
Title: DocumentFragment.append()
on GitHub


URL: /en-US/docs/Web/API/Element
Title: Element
on GitHub


URL: /en-US/docs/Web/API/Element/prepend
Title: Element.prepend()
on GitHub


URL: /en-US/docs/Web/API/Element/append
Title: Element.append()
on GitHub


URL: /en-US/docs/Web/API/XMLSerializer
Title: XMLSerializer
on GitHub


URL: /en-US/docs/Web/API/ParentNode/replaceChildren
Title: ParentNode.replaceChildren()
on GitHub


URL: /en-US/docs/Web/API/Node/insertBefore
Title: Node.insertBefore()
on GitHub


URL: /en-US/docs/Web/API/Node/appendChild
Title: Node.appendChild()
on GitHub

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked through all the changes, and this looks really good; thanks @Elchi3 !

@chrisdavidmills chrisdavidmills merged commit bd5cb71 into mdn:main Apr 16, 2021
@Elchi3 Elchi3 deleted the demix-parentnode-append-prepend branch April 16, 2021 13:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 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.

None yet

2 participants