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

Re: [selectors-api] Minor comments on the spec text

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Wed, 27 Jun 2007 01:08:08 +1000
Message-ID: <46812BD8.3080408@lachy.id.au>
To: liorean <liorean@gmail.com>
CC: "Web APIs WG (public)" <public-webapi@w3.org>

liorean wrote:
> On 25/06/07, Lachlan Hunt <lachlan.hunt@lachy.id.au> wrote:
>> Philip Taylor wrote:
>>> [...]
>> Correct me if I'm wrong, but if it were declared inside the loop, 
>> the variable would be destroyed and reallocated in memory for every 
>> loop. By declaring it outside, it just allocates it once, which is 
>> more efficient.
> Variable creation in ECMAScript always takes place before entering 
> the execution phase and continues until the closure is garbage 
> collected. [...]

Thanks for the explanation.

>>> Is it necessary to say that exceptions thrown inside 
>>> lookupNamespaceURI must propagate outwards to the selectElement 
>>> caller? Maybe that's obvious or is defined elsewhere.
>> AIUI, exceptions continue to propagate until they are caught or 
>> result in an error.  I don't believe there is a need for me to 
>> specify that in this spec.
> Exception handling can differ between languages,

Yes, I'm aware of that.

> I think it wouldn't hurt to specify that an exception should be 
> propagated (or rethrown?) out to the caller.

Do any other specs specify such a requirement for exception handling? 
Surely, if it were necessary to state that, it should be in DOM Level 3 
Core where DOMException is defined, instead of in each individual spec 
that uses exceptions.


I added explicit references to DOM 3 Core, where the exceptions are 

>>> Is it necessary to say what 'this' is, when nsresolver is a 
>>> Function?
> It's not invoked as a method on anything, it doesn't make sense to 
> pretend that is is (unlike DOM Events, which for backward 
> compatibility makes sense to pretend are method calls on the target 
> element), so I'd say let the default take place. I.e. in ECMAScript 
> the this value would be the global object (window in browsers).

OK, that makes sense.

Lachlan Hunt
Received on Tuesday, 26 June 2007 15:08:27 UTC

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