Re: Web IDL sequence<T> and item() method

In DOM-4 WD, NodeList is now defined as an interface, and not using
sequence<T>. [1]

[1] http://www.w3.org/TR/domcore/#interface-nodelist

>From what I can tell, WebIDL sequence<T> does not entail providing an
item() method, which effectively makes it unusable for any of the
pre-existing DOM interfaces with ECMAScript bindings. It may be worth
modifying WebIDL to generate an item() method in its ECMAScript binding.

On Sun, Dec 11, 2011 at 8:21 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 12/11/11 7:21 AM, Anne van Kesteren wrote:
>
>> The DOM specifications probably need to move back to using interface
>> rather than sequence. I was hoping sequence would define the whole
>> collection thing magically, but it never turned out that way. Still not
>> quite sure what the real use case is for sequence.
>>
>
> Last I checked, defining an interface that takes an in parameter that can
> be a nodelist or JS Array of nodes needs to use sequence, no?  Or am I
> confusing it with array again?
>
> -Boris
>
>
>

Received on Sunday, 11 December 2011 15:34:21 UTC