Re: [Bug 12287] Restrict sequence<T> to operation argument types and return types
> 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

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 ≝

Received on Monday, 23 May 2011 22:32:14 UTC