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: <andrew@ado.is-a-geek.net>
Date: Mon, 23 May 2011 09:04:54 -0000
Message-ID: <252ccf4477ffac6d67339189ebd5104c.squirrel@default>
To: public-script-coord@w3.org, whatwg@lists.whatwg.org
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.
Received on Monday, 23 May 2011 09:05:22 UTC

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