W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2015

Re: Array-with-item in WebIDL

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Wed, 17 Jun 2015 09:49:30 -0400
Message-ID: <55817AEA.4080600@mit.edu>
To: Garrett Smith <dhtmlkitchen@gmail.com>
CC: public-script-coord@w3.org
On 6/17/15 2:11 AM, Garrett Smith wrote:
> https://developer.mozilla.org/en-US/docs/Web/API/Node/contains

Ah, from Node, fine.  But no one is proposing replacing HTMLFormElement 
by an Array subclass, so this is not an issue.

>>>    HTMLSelectElement

Again, no one is suggesting replacing that by an Array subclass.

> SELECT and FORM elements have a contains method. And they are
> arraylike in that they have a length and indexed properties.

OK, but see above.  So not relevant to this discussion.

> I don't understand that documentation.

Then maybe you shouldn't claim things aren't non-standard if you don't 
understand the standard?

The point is, per spec HTMLObjectElement instances are callable.  And 
HTMLCollection has a named getter.  So <object id="contains"> will show 
up in the HTMLCollection as a property named "contains" (because of the 
named getter) and the value will be a callable HTMLObjectElement instance.

None of which is relevant to the discussion at hand, because no one is 
suggesting replacing HTMLCollection with an Array subclass.

Received on Wednesday, 17 June 2015 13:49:59 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 17 June 2015 13:50:00 UTC