[whatwg] Proposal: Adding methods like getElementById and getElementsByTagName to DocumentFragments
tim at clothears.org.uk
Sat Jun 29 14:55:00 PDT 2013
On 29 Jun 2013 at 01:37, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
> On Fri, Jun 28, 2013 at 5:32 PM, Zirak A <zirak at 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
>> document fragments are documents - so they should have a consistent API.
>> Adding this isn't about "backwards compatibility" or anything of the sort.
>> 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
More information about the whatwg