- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Mon, 24 Dec 2007 19:27:39 -0500
- To: public-webapi@w3.org
Comments on http://www.w3.org/TR/2007/WD-selectors-api-20071221/#nsresolver-interface * What is the expected behavior of lookupNamespaceURI when a null DOMString is passed in? Should it match the behavior when an empty string is passed in? Note that in ECMAScript, for example, the tests: if (!prefix) and if (prefix == "") are not equivalent, to say nothing of if (prefix === "") * The text "it MUST do either of the following" at the end of the second paragraph after the interface definition would be better written as "it MUST do one of the following". * It's not clear what "similar constructs" means in the phrase "and other languages that allow similar constructs". Does this mean "first-class functions", or something else? * It should be clarified that if the NSResolver is a Function, invoking the function with a single string argument should replace calling the lookupNamespaceURI method. I believe the DOM Level 2 Events ECMAScript bindings for EventListener have some language that could be reused here. * I'm not sure what the "or does not return a DOMString" text in the "To resolve namespace prefixes" paragraph means. Does this mean that if, say, an ECMAScript an object with a toString() method is returned this method must not be invoked and instead the namespace should be treated as unresolvable? * What does "or equivalent" refer to in the "To get the default namespace" section? Why is that not applicable to the "To resolve namespace prefixes" section? I would expect empty string handling to be identical in both sections. * It might make sense to talk about "callers" in this section instead of "user agents", though I'm OK with the existing language if the change is judged to be too confusing for non-technical readers of the specification. * In the example paragraph starting with "For convenience", there is a missing 'i' in the word "insensitive". -Boris
Received on Tuesday, 25 December 2007 00:27:53 UTC