01:41
<Ben Lesh>
Hmm I would prefer replaceWithChildren, to mirror the existing replaceWith and replaceChildren

+1 for replaceWithChildren... flatten is a loaded term in the ecosystem that usually comes with some sort of possibility of depth. There's also "unwrap" or "expand"... but replaceWithChildren is more explicit.

Then again there's always "supplant", which is from Ultron in Avengers: Age Of Ultron when he said "People create children to supplant them".

07:24
<annevk>
I initially read that as "comes with some sort of possibility of death"
07:28
<annevk>
For context, the terms started out as dropElements and blockElements. I kept forgetting (and still don't remember) which has the remove semantics and which has the flatten / replace with children semantics.
22:20
<TabAtkins>
I'm also pretty strong on "flatten already has a meaning that's not consistent with what you're defining"; I'm fine with "replaceWithChildren" (but don't feel strongly about any name)
22:22
<TabAtkins>
JS's flatten is the existing claimant to that name, and if you're leaning on that semantic then it would indeed imply what rkirsling said - replacing an element's children with their contents, so you lose one level of nesting within the element. If you're flattening an element into its parent, you need a different name.
22:35
<ljharb>
so are we basically trying to come up with a name for what happens when you stick a document fragment into an element?