- From: Maciej Stachowiak <mjs@apple.com>
- Date: Tue, 6 Feb 2007 15:19:30 -0800
- To: "Web API WG (public)" <public-webapi@w3.org>
- Message-Id: <2AC95504-75DF-4D2E-A2C2-0D06A1EC8045@apple.com>
Whoops, I meant to send this to the public list: Begin forwarded message: > Resent-From: member-webapi@w3.org > From: Maciej Stachowiak <mjs@apple.com> > Date: February 6, 2007 3:06:36 PM PST > To: Charles McCathieNevile <chaals@opera.com> > Cc: Web API WG <member-webapi@w3.org> > Subject: Re: Proposal: getElementsBySelector() > > > > On Feb 6, 2007, at 11:53 AM, Charles McCathieNevile wrote: > >> On Tue, 06 Feb 2007 17:41:03 +0530, Maciej Stachowiak >> <mjs@apple.com> wrote: >> >>> On Feb 5, 2007, at 10:18 PM, Charles McCathieNevile wrote: >>>> <annevk@opera.com> wrote: >>>>> ... Given that, I propose we rename .getAll() to >>>>> .getElementsBySelector() and drop .get() (on both Document and >>>>> Element). >>>>> >> ... >>>>> If there are no strong objections I'll implement this in the >>>>> specification. >>>> >>>> Not having heard strong objections, and having had support for >>>> getElementsBySelector() that is at least as strong as anything >>>> else, I think (with >>>> my chair's hat) this can be taken as the current resolution of the >>>> naming debate. >>>> >>>> Which would also resolve ISSUE-110. >>>> >>>> Any objections? >>> >>> I stated my objection already in my message on this thread from >>> January 28th. >> >> Yep. Thank you. > > I mentioned this because you said you hadn't heard any strong > objections, so I wasn't sure if you missed mine. > >> I am trying to find out if you are one lone voice of reason >> actually speaking for a multitude who didn't answer for >> themselves, or just >> marching to the beat of a different drum, or somewhere in between... >> >> It would also be helpful to have an idea of how strongly you >> object on each of >> the points (name and having a single method). > > I have no more or less problem with the name than previous name > proposals - I already made my big honkin' list of suggested shorter > names. > > I do object to having a single method because it will lead to worse > performance when you really just want one element, even given > Bjoern's interesting optimization idea (which I think is a > problematic approach in its own way since it increases code > complexity, and potentially slows down DOM mutations a bit, where > the whole idea of using a StaticNodeList was to keep list access > and DOM manipulations from interfering with each other. > > I think it should at least in principle be possible to implement > gEBS to be as fast as getElementById when given an id selector and > requesting one result, but I don't think that is doable with > Bjoern's design, at the very least due to the extra allocation and > also because when you look for a single element you are highly > likely to mutate it in some way and therefore make Bjoern's > proposed mutation ineffective. > > Is there a major benefit to having a single method that outweighs > the performance considerations? I think we should have a better > reason for deciding this than "we feel like it". > > Adding list back to Cc, I assume it was omitted by accident. > > Regards, > Maciej > > > > >
Received on Tuesday, 6 February 2007 23:19:41 UTC