Message from JavaScript discussions

October 2017

— It says it should return inserted nodes, not the parent they came from

— 

I was in the C++ source and have fully documented the implementation now. No one who wrote docs knew about this.

— Also it doesn't matter if a document fragment is a node or not, the documented behavior is very clear about what should get returned, and the fragment is not an inserted node.

Message permanent page

— I don't think its bad implemented. They never states "if the newChild is a DocumentFragment, the DocumentFragment objects are returned". They states: "this results in all the child nodes of the DocumentFragment being moved to the child list". The newChild is a Node, so that is returned.
Is very suttle the difference.

Message permanent page

— I know what it says, I wrote a report and reproducer on it

— This isn't a matter of misinterpreting what it says at all, it is too clear for that

— Read this

— Has all my sources and references

— Because it is such a simple documentation, in the spec, it's not possible for misinterpretation on my part. The spec and all documentation on MDN did not mention that behavior whatsoever is what the problem is.

Message permanent page

— In fact, the documented behavior (returning inserted nodes sometimes) is technically a side effect of returning the first parameter to the function

Message permanent page

— That's all it does, blindly, without checking for the special case of that parameter being a fragment which has that special child-moving behavior defined in the spec.

Message permanent page

— So no one bothered to document this, but I did. That is all