— 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.
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.
— 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.
— In fact, the documented behavior (returning inserted nodes sometimes) is technically a side effect of returning the first parameter to the function
— 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.
— So no one bothered to document this, but I did. That is all
— Does anybody know about nexe in nodejs?
— Use this instead: https://github.com/pmq20/node-packer