Re: [css3-selectors] Implementing jQuery E: has(F) selector

Gabriele Romanato wrote:
> Dear all,
> the E:has(F) selector matches an E element when it has a F element 
> within it. I think that's a powerful feature that should be implemented.

I suggest looking at the archives; this has been brought up before.

> I don't think it's very difficult to implement, because if it's true 
> that it's been implemented in JavaScript, it's also true that it would 
> be very easy
> to implement in a more powerful programming language, such as C++

There are several logical fallacies here (ranging from the fact that JS 
is in fact a higher-level language than C++, hence "more powerful" for 
most reasonably meanings of the term) to the assumption that the jquery 
implementation is a reasonable example of what a browser would need to 
implement (it's not; it works on a static DOM snapshot and doesn't have 
to deal with dynamic changes).

> ps. if you think, as implementor, that it's still too "expensive", well, 
> I don't see the point if you think in terms of incremental 
> rendering and reflow model
> (see http://mxr.mozilla.org/firefox/search?string=reflow for a redundant 
> overview. HTML docs there are obsolete (NGLayout is from 1998!).

I have no idea what you're talking about here.

If you think this is really easy to implement, though, we (Mozilla) are 
always accepting patches.  I hear so is Webkit.  I would be happy to 
shepherd any patch you create for this "not very difficult to implement" 
feature into the tree, assuming it doesn't have any undesirable 
performance impact.

-Boris

Received on Friday, 10 July 2009 16:56:56 UTC