W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2010

Re: DOM collections index out of bounds and JavaScript.

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 27 Oct 2010 10:06:08 +1300
To: Anne van Kesteren <annevk@opera.com>
Cc: Garrett Smith <dhtmlkitchen@gmail.com>, Erik Arvidsson <arv@chromium.org>, public-webapps@w3.org
Message-ID: <20101026210608.GB6526@wok.mcc.id.au>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:41 GMT