[whatwg] [Bug 12287] Restrict sequence<T> to operation argument types and return types

andrew at ado.is-a-geek.net:
> Can MessagePortArray be changed to be some kind of collection like many of
> the other places in DOM when we want a list of children?  This would probably
> be easiest for me, but perhaps there is a better way.

I suggest just changing the typedef to `typedef MessagePort[]
MessagePortArray;`, and define MessageEvent.ports to be a read only
array.

http://dev.w3.org/2006/webapi/WebIDL/#dfn-read-only-array

An alternative would be to define a new collection interface for the
attribute, as you suggest.  But for the arguments to
MessageEvent.initMessageEvent() and MessagePort.postMessage() these
would need to be sequence or array types so that you could pass in a JS
Array object.

-- 
Cameron McCormack ? http://mcc.id.au/

Received on Monday, 23 May 2011 15:31:45 UTC