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

Re: What type should .findAll return

From: Rick Waldron <waldron.rick@gmail.com>
Date: Mon, 14 Nov 2011 13:46:22 -0500
Message-ID: <CAHfnhfpKm6nydRPNbaHpCKq-nntKgziX1TAyk58+1ej9EZMdkg@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: Allen Wirfs-Brock <allen@wirfs-brock.com>, Yehuda Katz <wycats@gmail.com>, Boris Zbarsky <bzbarsky@mit.edu>, "public-script-coord@w3.org" <public-script-coord@w3.org>, public-webapps <public-webapps@w3.org>
>
> [snip]
>


> ES5.1 clause 8.6.2 says:
> >           "The value of the [[Class]] internal property of a host object
> may be any String value except one of "Arguments", "Array",..."
> > In other words, host object provides (such as a DOM implementation) are
> not allowed to define new kinds of objects whose [[Class]] is Array.
> > It's fine to want to define a new kind of host object that is
> behaviorally very similar (but slight different) from instances of the
> built-in Array constructor.  But characterizing such objects by saying they
> have [[Class]]=="Array"
> >  is a not meaningful from a ES5.1 specification perspective.
>
> I'm fine with any formulation, as long as it gives the correct behaviour
> in cases like Array.prototype.concat and Array.isArray.
>

ES 5.1 15.4.3.2 Array.isArray()
...
2. If the value of the [[Class]] internal property of arg is "Array", then
return true.
...

Considering Allen's previous comment, this is not going to be allowed.

Rick


>
> Do you have suggestions for what to write?
>
> / Jonas
Received on Monday, 14 November 2011 18:47:23 GMT

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