Re: Proposal for limited :matches pseudoclass

On Thu, Jul 31, 2008 at 6:41 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> Tab Atkins Jr. wrote:
>
>> Got it there at the end.  The + and ~ combinators seem to be naturally
>> symmetric, thus whether you match forward or backward doesn't seem to make a
>> difference in the complexity (to me, at least).
>>
>
> But there is a fundamental asymmetry in DOM mutations.  During parsing, you
> always add chidren and later siblings, almost never previous siblings, and
> never ancestors.
>
> Once the page is all loaded, of course, things are a lot more symmetric.
>
> -Boris
>

Ah, I understand.  It makes sense now why :matches() would be slower on page
load.

Really, thank you for these explanations.  This thread, combined with
Francois's other thread, has, if nothing else, made the CSS parser much less
confusing for me (and hopefully others).

~TJ

Received on Friday, 1 August 2008 02:54:28 UTC