[whatwg/dom] TreeWalker’s relationship to Document? (#818)

TreeWalker instances can only be created with `Document.prototype.createTreeWalker`. Is this by necessity, due to some relationship created between a given Document and TreeWalker up front, or is this just historical? I didn’t see anything obvious in the spec that suggested TreeWalkers maintain a relationship to the Document from which they were created — it doesn’t even appear the Node argument has to have the same ownerDocument.

Asking mainly because it would be lovely to be able to just write `new TreeWalker`.



-- 
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/818

Received on Friday, 10 January 2020 09:46:15 UTC