On Sun, Jul 28, 2013 at 7:28 PM, Francois REMY
wrote:
> Cool to see my CSS Filter thing seems the less controversial part of the mix
> :-)
>
>> > - a new 'iterateBackwards' boolean field on TreeWalker/NodeIterator
>> > that would make any ES iterator call previousNode() instead of
>> > nextNode()
Cool to see my CSS Filter thing seems the less controversial part of the mix :-)
> > - a new 'iterateBackwards' boolean field on TreeWalker/NodeIterator
> > that would make any ES iterator call previousNode() instead of
> > nextNode() when computing the next iteration (to make navigation
> > po
On Sun, Jul 28, 2013 at 11:02 AM, François REMY
wrote:
> So, let's sum this up. The proposed changes are:
>
> - a new overload of createTreeWalker/createNodeIterator whose second argument
> can be a string representing a CSS selector, with the other arguments now
> being optional (not forced to
On Sun, Jul 28, 2013 at 12:19 PM, François REMY
wrote:
> How do you write that using WebIDL? It there an attribute for that?
It's an open issue: https://www.w3.org/Bugs/Public/show_bug.cgi?id=17648
(Temporary) IDL constraints don't affect API design though.
--
http://annevankesteren.nl/
Domenic Denicola wrote:
`.iterator()` is a nonstandard Mozilla-ism;
Rather, a temporary state while we were arguing about ES6 and waiting
for symbols to be specified (still waiting). It's not a permanent addition.
/be
> `.iterator()` is a nonstandard Mozilla-ism;
> the spec calls for a field named by the
> well-known unique symbol `@@iterator`.
How do you write that using WebIDL? It there an attribute for that?
From: François REMY [mailto:francois.remy@outlook.com]
> If I'm not mistaken, all it takes for this to work is to add an .iterator()
> function on the TreeWalker/NodeIterator interface
`.iterator()` is a nonstandard Mozilla-ism; the spec calls for a field named by
the well-known unique sym
> I hate TreeWalker because it's an iterator but not an ES Iterator.
> DOM is broken, legacy cruft, etc.
As far as I know, an iterator can only go forward, not backward (while a tree
walker can). But I agree 90% of the use cases map to a forward navigation and
it would be nice to support for-of
On Sat, Jul 27, 2013 at 9:49 PM, François REMY
wrote:
> Is there any reason everybody hate TreeWalker?
I hate TreeWalker because it's an iterator but not an ES Iterator.
DOM is broken, legacy cruft, etc.
I'm fine with something that exposes TreeWalker's abilities to start
from a given node, but
> I like the idea of being able to get lazy iterators and treewalkers.
> And that are driven by selectors. But I think creating a new feature
> rather than trying to retrofit existing ones will be more successful.
Why? I need *exactly* the behavior the TreeWalker is offering me now: ie a lazy
On Jul 27, 2013 6:55 PM, "François REMY"
wrote:
>
> TL/DR: CSS Selectors represent the most commonly used way to perform
search in the DOM. But, until now, you’ve to choose between using CSS
(querySelectorAll) or doing incremental search (createTreeWalker). I think
we should try to fix that.
>
> T
> Both of these seem very like the ES6
> iterator interface. Can you just use
> that instead of minting a new iterable/
> iterator interface?
Again, that doesn't solve my TreeWalker use case :-/
> From: o...@chromium.org
>
> An alternate proposal:
> http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-July/040264.html.
> var iterator = document.querySelectorAll("abc").asIterator();
You make the assumption I want to walk in the forward direction and do not want
to start from a spec
Both of these seem very like the ES6 iterator interface. Can you just use that
instead of minting a new iterable/iterator interface, viz.
`.iterator()`/`.next()` or `.nextNode()`? The resulting code would be
```js
var tw = document.createTreeWalker(document.body, "ul.menu > li");
for (var node
An alternate proposal:
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-July/040264.html.
What I like about my proposal is that it can be generalized to anything
that returns a Sequence and also is just less awkward than the
TreeWalker/NodeIterator interfaces.
On Sat, Jul 27, 2013 at 6:33
15 matches
Mail list logo