Re: DOM collections index out of bounds and JavaScript.

Anne van Kesteren:
> Yeah, it would be nice if sequence mapped to that so that NodeList
> could be defined as a sequence instead, same for StyleSheetList,
> etc. And then Web IDL would take care of all the details rather than
> each specification.

I don’t know that sequence is appropriate for this.  They are meant to
be for pass-by-value lists.

Is the issue here that you can’t use a base interface because then you
would lose some type specificity, e.g.

  interface Collection {
    attribute unsigned long length;
    getter any item(unsigned long index);
  }

where you need to use “any” because you don’t know what the type of the
derived interface elements will be?

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Tuesday, 26 October 2010 21:06:59 UTC