Re: Extending Class Proposal

On Thu, Jan 31, 2013 at 12:28 PM, Philip Walton <philip@philipwalton.com> wrote:
> I agree with you that in CSS, whenever a selector appears that you've
> extended, you need to simply pretend those extended selectors are there as
> well. This make sense because you're being declarative and building styles.
>
> I dont think it works as well in JavaScript because the function is actually
> returning a list of DOM nodes. It's not backwards compatible. If tomorrow
> Chrome suddenly started including extended elements in the set of returned
> nodes, you'd break a lot of websites. That's why I think a new simple
> selector would work best.

No, we wouldn't break anyone, *because you can't extend anything yet*.

We'll only have a compat problem if we add the ability to extend
selectors, but don't cover the querySelector case, and it doesn't get
properly updated in tandem.

~TJ

Received on Thursday, 31 January 2013 21:11:07 UTC