W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2012

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

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 9 Jan 2012 23:46:41 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1201092346110.25423@ps20323.dreamhostps.com>
On Mon, 23 May 2011, andrew at ado.is-a-geek.net wrote:
> http://www.w3.org/Bugs/Public/show_bug.cgi?id=12287:
> > sequence<T> has undesirable behaviour in JS when used as an attribute
> > value, so we should consider preventing its use there.
> 
> HTML5 Section 10:
> > typedef sequence<MessagePort> MessagePortArray;
> >
> > interface MessageEvent : Event {
> >   readonly attribute any data;
> >   readonly attribute DOMString origin;
> >   readonly attribute DOMString lastEventId;
> >   readonly attribute WindowProxy source;
> >   readonly attribute MessagePortArray ports;
> >   void initMessageEvent(...);
> > };
> 
> The WebIDL specification has been changed so the MessageEvent interface 
> in HTML5 is no longer valid.  This only appears to have been implemented 
> by Opera at the moment, and it returns the same ECMAScript Array every 
> time it is called.  I would guess this can still be changed given that 
> it is not widely implemented.
> 
> 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 believe this has since been fixed; the spec now uses MessagePort[] as 
the type for MessageEvent.ports.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 9 January 2012 15:46:41 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:10 UTC