Re: [whatwg/dom] Wrong return type of Node::getRootNode() (#739)

> which is documented to be a property of the return value of Node::getRootNode().

What documentation is that referring to? It's not in the spec, which says that the return value is of type `Node`.

Anyway, `getRootNode()`'s specification is correct. If you look at the algorithm, in https://dom.spec.whatwg.org/#dom-node-getrootnode , you'll see it can return the root node, which can be a `Document`, which is not a `ShadowRoot`. Try it in your own browser: type `document.body.getRootNode()` and see what it returns.

-- 
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/739#issuecomment-474644967

Received on Wednesday, 20 March 2019 01:13:30 UTC