W3C home > Mailing lists > Public > public-webapi@w3.org > July 2007

CSS Query API: selectorQuery(...)

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 19 Jul 2007 19:07:19 +0200
To: public-webapi@w3.org
Message-ID: <ma2v9397kculi3pfs1jubg32m3tp86bko6@hive.bjoern.hoehrmann.de>


  The WebAPI Working Group is considering to conduct a poll to finally
put the method naming issue in the CSS Query API specification to rest;
Charles asked us to propose alternatives to selectElement/selectAllEle-
ments. To this end, I would like to propose using two [1] of 

  selectorQuery(...) / .selectorQueryAll(...) / .selectorQueryOne(...)

instead. I believe these names offer the following benefits:

  * This is the only set of names where I know of no working 
    group member with a good reason to strongly dislike them.

  * Many working group members have indicated these names work
    for them. Even Anne!

  * They are lexically distant from the selectNodes and select-
    SingleNode XPath methods that serve a very similar purpose.

  * They are lexically distant from DOM Range manipulation
    methods like DOM T&R's .selectNode, Dojo's .selectElement

  * They are quite unlikely to clash with other future DOM
    methods and attributes designed for other purposes.

  * In particular, DOM attributes that reflect XML attributes;
    selectElement='' is much more likely than selectorQuery='',
    c.f. SVG's targetElement='...'

  * They are just as long as the .select(All)Element(s) names.

I understand somebody has to make the same proposal (or second this
one) for it to be considered; if you think these names should be
considered, or even think these would be better than selectElement,
you are very welcome to do that.

[1] There have been arguments that the shorter name should return a
    single element so authors write possibly more efficient code,
    and that the shorter name should return many elements because
    that is required more often and saves a few keystrokes. I think
    this is out of scope of the proposal and should be a separate
    question in the poll, if we are going to conduct one.

Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 19 July 2007 17:07:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:24 UTC