Selectors API Naming Debate Revisited

2 months ago, I reported that I had resolved the Selectors API naming debate. Well, sadly, those names didn’t work out and I got overruled :-(. We ended up holding a Working Group vote to resolve the issue and, as a result, a new set of names were chosen.

The winners were announced just over a week ago: querySelector() and querySelectorAll(). These names already appear in the editors draft, which will soon be publised as a Last Call Working Draft.

9 thoughts on “Selectors API Naming Debate Revisited

  1. > querySelector()/querySelectorAll() scored 41
    > getElementBySelector()/getElementListBySelector() scored 43

    Why NOT getElementBySelector()/getElementListBySelector() scored?!

  2. minghong, the lowest score won because we were asked to rank the choices from most preferred (1) to least preferred (7). See the results page. (Note: I had linked to the wrong results page in the article, but that’s been corrected now)

  3. Note that originally getElementsBySelector() was voted for, but the editors didn’t like that name at all, so they basically went their own way.
    Please correct me if I’m wrong.

    Current names are a deviation of what there already is, like getElementByID/getElementsByTagName.

  4. querySelector is just wrong … you aren’t asking a “Selector” object for something, you’re using a selector to find elements.

    selectElement is far more logical and correct.

    Oh well, too late.

    I posted a message to the mailing list about this and it seems it was rejected/deleted. That’s just impolite.

  5. Glen, when did you e-mail the list about this? If it was recently, then I didn’t receive it and it’s likely that your mail was held by the list moderation system that requires first time posters to agree to have their emails archived.

    Anyway, you’re right about the names, but there’s nothing I could do about it.

  6. Hi Lachlan, it was on Friday (June 19). I did agree to archiving.

    No worries, it’s not important.

Comments are closed.