atom feed72 messages in org.w3.public-webapiRe: ACTION-87: Selectors API
FromSent OnAttachments
12 earlier messages
Cameron McCormackFeb 26, 2006 2:33 am 
Cameron McCormackFeb 26, 2006 1:04 pm 
Maciej StachowiakFeb 26, 2006 3:03 pm 
Jonas SickingFeb 28, 2006 1:57 pm 
Ian HicksonMar 6, 2006 12:33 pm 
Ian HicksonMar 6, 2006 12:35 pm 
Anne van KesterenMar 22, 2006 2:30 am 
Anne van KesterenMar 22, 2006 2:33 am 
Anne van KesterenMar 22, 2006 2:35 am 
mozerMar 22, 2006 3:16 am 
Anne van KesterenMar 22, 2006 3:58 am 
mozerMar 22, 2006 4:30 am 
Anne van KesterenMar 22, 2006 4:37 am 
Jim LeyMar 22, 2006 5:43 am 
Anne van KesterenMar 22, 2006 6:08 am 
Jim LeyMar 22, 2006 6:45 am 
Maciej StachowiakMar 22, 2006 11:16 am 
Maciej StachowiakMar 22, 2006 11:22 am 
Maciej StachowiakMar 22, 2006 11:25 am 
Robin BerjonMar 22, 2006 2:01 pm 
Maciej StachowiakMar 22, 2006 2:28 pm 
Ian HicksonMar 22, 2006 2:48 pm 
Ian HicksonMar 22, 2006 2:51 pm 
Maciej StachowiakMar 22, 2006 3:20 pm 
Jim LeyMar 22, 2006 6:17 pm 
Jim LeyMar 22, 2006 6:24 pm 
Anne van KesterenMar 23, 2006 4:28 am 
Ian HicksonMar 23, 2006 2:31 pm 
Anne van KesterenMar 25, 2006 4:36 am 
Ian HicksonMar 27, 2006 3:13 pm 
Anne van KesterenApr 3, 2006 5:46 am 
Anne van KesterenApr 3, 2006 5:51 am 
lioreanMay 12, 2006 8:49 pm 
Anne van KesterenMay 13, 2006 4:15 am 
lioreanMay 13, 2006 12:08 pm 
Anne van KesterenMay 13, 2006 12:26 pm 
lioreanMay 13, 2006 2:40 pm 
Anne van KesterenMay 14, 2006 7:20 am 
lioreanMay 14, 2006 4:22 pm 
Anne van KesterenMay 15, 2006 3:15 am 
lioreanMay 16, 2006 9:29 pm 
Anne van KesterenMay 17, 2006 5:18 am 
Lachlan HuntMay 17, 2006 6:19 am 
Anne van KesterenMay 17, 2006 6:30 am 
Jim LeyMay 17, 2006 6:35 am 
Lachlan HuntMay 17, 2006 7:02 am 
Robin BerjonMay 17, 2006 7:07 am 
Anne van KesterenMay 18, 2006 12:46 am 
Jonas SickingMay 30, 2006 3:11 pm 
Jonas SickingMay 30, 2006 3:24 pm 
10 later messages
Subject:Re: ACTION-87: Selectors API
From:Jim Ley (ji@jibbering.com)
Date:Mar 22, 2006 6:17:20 pm
List:org.w3.public-webapi

"Maciej Stachowiak" <mj@apple.com>

1) I think it's really useful to have these names be short.

Short but impossible to tell what they actually do - I have no idea that match has anything to do with CSS - indeed I have little understanding of why CSS syntax has suddenly become Selectors, it's unclear, it's imprecise and it's confusing. Brevity is irrelevant.

The fact that one of the most common operations you do by the dom is called document.getElementById is a huge disaster.

I think you need some evidence to back up this "huge disaster", it's very well used, and very well known, and it is extremely clear what it does, for me it's one of the few sucessful parts of the DOM.

Use case for matching one is to be able to easily operate on the first item when you know you have a unique match:

document.match("#header").addEventListener("click", headerClick, false);

This is unsafe, and completely not a use case, please use examples that are actually reasonable (ie not ones that are already met by existing technology. Please provide a use case - ie a reasonable example expression where there's only going to be 1 result (and no more and no less in the above example), if you mean it's an author optimisation, then author is equally likely to know if there are 4 or more results, so the optimisation of a limit is exactly the way to go, rather than just 1, it also simplifies the DOM as there's only one method.

document.match("iframe[name='ad-banner']").addEventListener("click", bannerClick, false);

Another poor example already met by existing implemented APIs. Please provide example use cases for this single match optimisation.

I don't think the case of "first n for some arbitrary value of n" is common enough to be worth adding API for.

I'm not convinced the singular is either, indeed the author optimisation use case of knowing the number is a use case I can see. DOM's are slow enough as it is.

Mainly these names say nothing about their inescapable link to Selectors, they should.

Unfortunately the name document.selectNodes is taken by XPath, and select() would be easily confused with document.selection.

I don't regard either of those as acceptable meaningful names either.

Jim.