Re: [WebIDL] Trying to understand IndexGetter/NameGetter

On 10/21/09 6:38 PM, Jason Orendorff wrote:
> Well, there is if the range changes, right? Maybe I don't understand
> the proposal. What range would be supported for a DOMNodeList?

For the getter, whatever the number of nodes is (which varies).

For the setter nothing, so any attempt to set [n] for any n would throw. 
  Same for attempts to add, from script, properties named with integers.

> I think we have to cope with "real" ES5 properties interacting with
> "virtual" properties, but I don't think it has to be complicated.
> Suppose all real properties simply shadow all virtual properties, and
> virtual properties shadow the prototype chain. That leaves a bunch of
> little issues, but are there any really troubling problems?

I was actually thinking specifically about the use case of canvas 
imagedata and such, where throwing on out-of-bounds access might be 
preferable to setting properties that will be ignored later.

-Boris

Received on Wednesday, 21 October 2009 23:49:48 UTC