W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2013

Re: [whatwg] Proposal: Adding methods like getElementById and getElementsByTagName to DocumentFragments

From: Tim Streater <tim@clothears.org.uk>
Date: 29 Jun 2013 22:55 +0100
To: Tab Atkins Jr. <jackalmage@gmail.com>, Zirak A <zirak@mail.com>
Message-Id: <20130629215536.576A0984220@zapata.dreamhost.com>
Cc: WHATWG <whatwg@lists.whatwg.org>
On 29 Jun 2013 at 01:37, Tab Atkins Jr. <jackalmage@gmail.com> wrote: 

> On Fri, Jun 28, 2013 at 5:32 PM, Zirak A <zirak@mail.com> wrote:
>> But that's a bit looking at it backwards. Selectors are supposed to be an
>> abstraction over these methods, not the other way around. The point here is
>> that
>> document fragments are documents - so they should have a consistent API.
>> Adding this isn't about "backwards compatibility" or anything of the sort.
>> It's
>> adding methods that people already use, because as said, not everyone uses
>> selectors (and not just because of browser-compat).
> No, they're not.  You're rewriting history.  Selectors were never
> meant as a layer over those methods; they were a completely separate
> and independently-invented way to target elements for CSS's purposes.

But what I'm doing, I'm not doing for CSS purposes. I'm trying to find a particular row, by id, in order to modify the contents of cells in that row. I find it perverse to be using a style-related API call to do that.

Cheers  --  Tim
Received on Saturday, 29 June 2013 21:55:59 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:00 UTC