Re: [whatwg/dom] Suggestion: new method - getNodesByType (#992)

@WebReflection I suspect TreeWalker is ignored because it is incredibly esoteric.  It is a stand alone utility available as a part of the browsers' WebAPIs with its own internal filtration API and internal methods.

Furthermore, you can eventually come to the same conclusion using a custom function wrapping TreeWalker as the internal workings of the demonstration logic, which walks element nodes.  Neither are the same as a single method name requiring a single argument that does everything for you without any custom logic.

-1 numerical is the SHOW_ALL for TreeWalker.  The demonstration logic was only based upon nodeType values and their string constant equivalents which does not provide any value for 0 or -1.

* https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker
* https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType

-- 
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/992#issuecomment-866163053

Received on Tuesday, 22 June 2021 16:58:40 UTC