Re: TPAC F2F DOM2 Selectors API review

On 10/30/12 5:36 AM, Alex Russell wrote:
>   * We specify the DOM APIs which vend node lists which must be
>     immutable or mutated only by DOM (a.k.a. "live node lists") from
>     existing APIs as either seal()/freeze() instances or as Proxies.
>     That allows the vending APIs to maintain the invariants regardless
>     of what NodeList as a class does

Objects with index getters are already required to be proxies if you 
want to implement them in pure ES.

So I'm not quite sure what the above paragraph really means.  What are 
you trying to do there, precisely?

>   * We define NodeList as a constructable class which derives from
>     Array, is mutable by default, etc.

Derives in the sense that Object.getPrototypeOf(NodeList.prototype) == 
Array.prototype?  Or something more than that?

Which part is mutable?  Can you just set what's at a given existing 
index?  Set things at arbitrary indices?  Remove things at arbitrary 
indices to produce holes?  Set the length and produce holes?  Something 
else?

> Any obvious holes?

Well, other than the lack of clear description of what you're proposing, 
which makes it impossible to look for holes?  ;)

-Boris

Received on Tuesday, 30 October 2012 14:25:44 UTC