- From: Austin Cheney <notifications@github.com>
- Date: Wed, 23 Jun 2021 04:59:06 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/issues/992/866774326@github.com>
@rniwa That misses the point for the same reason as TreeWalker. I am proposing a single method that takes a single argument. There is no internal glue required. How that method executes internally whether using TreeWalker, nodeIterator, or simply walking the DOM (as in the original demonstration logic) is only a performance factor outside the intention of this proposal. If either nodeIterator or TreeWalker required no additional logic to get the desired results I wouldn't propose a more simple approach. Since they do require extensive boilerplate, on each use, XPath as @liamquin pointed out remains a far superior approach. Consider it from the perspective of querySelectors. They are likewise just as unnecessary and are thousands of times slower to execute. From all technical considerations they are a horrible approach when there were already numerous other superior conventions in place to achieve the same output. Why then were they so highly requested? They are a single method that requires a single argument. Unlike querySelectors the proposal here offers no loss of performance and may result in performance improvements at implementation. -- 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-866774326
Received on Wednesday, 23 June 2021 11:59:30 UTC