W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2011

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

From: Cameron McCormack <cam@mcc.id.au>
Date: Tue, 24 May 2011 10:31:45 +1200
To: andrew@ado.is-a-geek.net
Cc: public-script-coord@w3.org, whatwg@lists.whatwg.org
Message-ID: <20110523223145.GE18297@wok.mcc.id.au>
andrew@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 22:32:14 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:03 UTC