dom icon indicating copy to clipboard operation
dom copied to clipboard

What does adoptNode() return for DocumentFragment?

Open TimothyGu opened this issue 5 years ago • 2 comments

#754 adds to adoptNode():

  1. If node is a DocumentFragment node whose host is non-null, then return.

But adoptNode() must return a Node. What does this "return" mean?

@annevk

TimothyGu avatar Dec 31 '19 08:12 TimothyGu

Sigh, it seems that change introduced a bunch of errors. If we can fix the replaceChild() issue somehow I'd say it should return the node passed in, even though it was not adopted.

Perhaps I should first revert that change and test changes though while we figure out a new design. Thoughts welcome.

annevk avatar Jan 02 '20 07:01 annevk

I think that reverting would be good, especially since none of the major browsers have implemented it. I'd be glad to use jsdom as a testbed for any such change.

TimothyGu avatar Jan 02 '20 12:01 TimothyGu