Re: Omissions in IDL sequence and IDL array conversion to ES array

On 01/03/2012 02:12 PM, João Eiras wrote:
>
> Hi.
>
> I have some questions about the following two sections
> * http://dev.w3.org/2006/webapi/WebIDL/#es-sequence
> * http://dev.w3.org/2006/webapi/WebIDL/#es-array
>
> For the sake of the examples, exampleFunction is a function which
> converts the first argument to an ES Array.

My reading of the specification is that your examples would throw
TypeError because given an operation like

void foo(array);

the overload resolution algorithm will return no matches unless the
passed type is "is a platform array object, a native Array object, or a
platform object that supports indexed properties", which I think your
examples are not.

However this depends critically on an interpretation of "platform
object" that means a DOM object is a "platform object" whilst an object
like {0:1, 1:2, length:2} is not. I can't work out what the definition
of "platform object" in the spec is supposed to imply. In particular I
can't tell how one can determine mechanically if a given object is a
platform object or not. Could the spec be clarified here please?

Received on Tuesday, 3 January 2012 15:43:10 UTC