Re: [whatwg/dom] Proposal: New method to reorder child nodes (#891)

I think without fully understanding (and specifying) #808 it's hard to reason about how moving-within-a-parent should work. I.e., what side effects we need and do not need.

I think the most logical API that follows existing conventions would be `parent.moveChildBefore(Node child, Node? referenceChild)`. However, if sole use case is reordering multiple children `parent.moveChildren(Node...)` probably makes more sense. Either way this also requires designing new mutation records as this is a new mutation primitive. And we should probably forbid firing (legacy) mutation events.

I would also like to see some more rationale as to why an arbitrary move (with both parents sharing a common root) is less feasible. What are the particular implementation challenges that we would only expose a more restricted move?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/891#issuecomment-690037104

Received on Thursday, 10 September 2020 07:09:31 UTC