atom feed72 messages in org.w3.public-webapiRe: ACTION-87: Selectors API
FromSent OnAttachments
17 earlier messages
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 
Jonas SickingMay 30, 2006 3:42 pm 
Ian HicksonMay 30, 2006 3:55 pm 
Robin BerjonMay 30, 2006 4:15 pm 
Jonas SickingMay 30, 2006 5:56 pm 
Anne van KesterenJun 5, 2006 2:46 am 
5 later messages
Subject:Re: ACTION-87: Selectors API
From:Ian Hickson (ia@hixie.ch)
Date:Mar 27, 2006 3:13:25 pm
List:org.w3.public-webapi

On Sat, 25 Mar 2006, Anne van Kesteren wrote:

I just noticed that the current text means that this is non-conformant if userInputIsOneThing is true:

var s; if (userInputIsOneThing) { s = 'some random selector'; } else { s = 'some|random selector'; } var node = document.match(s, function(prefix) { if (prefix == 'some') return 'http://example.com'; else return null; });

...which seems bad ("If they don't use namespace prefixes within selectors authors must set nsresolver to null").

Nit-picking -- the paragraph that talks about authoring requirements says that "when authors use namespace prefixes within selectors they must create an object implementing the XPathNSResolver interface" but doesn't require that that object be used in any way (e.g. as an argument to the function). It would be better to require that they pass such an argument.

Also, "In the case of ECMAScript" is probably not what is meant (what is "the case" of ECMAScript?).

I'm not sure about this:

If the nsresolver argument is not of the right type UAs must raise a TYPE_MISMATCH_ERR exception.

...since I would expect the behaviour to depend on the language binding. (In fact, in most typed languages this would be a compile-time error anyway, and in most non-compiled languages there are language-specific rules for handling attempts to invoke methods on non-objects.) In general I would say this applies to any DOM method, and so this draft should not be defining it. Based on the way it is used in DOM3 Core, I would presume that TYPE_MISMATCH_ERR was specifically for arguments of type "any" (DOMUserData). Otherwise, e.g. appendChild() would need to be defined to throw it when passed a non-Node.

One final note -- I saw you added a Security section. Don't say that there is only one problem. When you discover, in 9 years, that there is a second security problem with this interface, you'll look silly if you claimed there was only one. :-)

It's best to just say "History theft is one potential security problem".

Anyway, these are all nit-picking details, which are generally up to the editor to worry about, so I'll stop now. :-)