Re: Selector API names - strawman
On Jan 11, 2007, at 3:33 AM, Robin Berjon wrote: Hi, while I hate naming discussions just as much as the next guy, the last proposal out is so deeply inept that I see no other option than to reopen this. Here is a proposal that is intended to satisfy both the brevity nazis, and those who like meaningful method names. I don't really like them myself, but I can live with them. - Document.css() - Document.cssAll() - Element.css() - Element.cssAll() I don't think these are an improvement. 1) css is not a verb 2) this sounds like it would return style declarations, not elements. These names are worse than vague, they are actively misleading. I like match/matchAll better than get/getAll or css/cssAll to be honest. Why don't we just go back to the original versions? Regards, Maciej
Selector API names - strawman
Hi, while I hate naming discussions just as much as the next guy, the last proposal out is so deeply inept that I see no other option than to reopen this. Here is a proposal that is intended to satisfy both the brevity nazis, and those who like meaningful method names. I don't really like them myself, but I can live with them. - Document.css() - Document.cssAll() - Element.css() - Element.cssAll() Same length, but with meaning. -- Robin Berjon - http://berjon.com/ Never doubt that a small group of thoughtful, committed people can change the world; indeed, it's the only thing that ever has. -- Margaret Mead
Re: Selector API names - strawman
Hi- Robin Berjon wrote: Here is a proposal that is intended to satisfy both the brevity nazis, and those who like meaningful method names. I don't really like them myself, but I can live with them. - Document.css() - Document.cssAll() - Element.css() - Element.cssAll() Same length, but with meaning. No, no, no. Burn that strawman. I'd much rather have .match() and .matchAll() (or just about anything else). I have a suspicion that .css*() would *really* confuse people into thinking it's a way of setting CSS style properties, or getting elements by classname, or just about anything other than a generic selector language. Again, my suggestion is .nodeBySelector() and .nodelistBySelector() (or something like that). .nodeByMatch()/.nodelistByMatch()? Regards- -Doug