Re: IDL: special DOMString that converts to Unicode

On Tue, Jul 23, 2013 at 1:41 AM, Cameron McCormack <cam@mcc.id.au> wrote:
> I've added the [EnsureUTF16] extended attribute now.
>
> http://dev.w3.org/2006/webapi/WebIDL/#EnsureUTF16
> http://dev.w3.org/cvsweb/2006/webapi/WebIDL/Overview.xml.diff?r1=1.646;r2=1.647;f=h

So actually an attribute does not work. Either this needs to be a type
or we should just go back to using the algorithm we have in IDL.

There are various places in the platform that assume Unicode scalar
values as input (e.g. the URL parser, encodings). This extended
attribute does not give them that, it still hands them code units. So
I think our options are:

1. Have a new type that does this.
2. Invoke this algorithm in a number of places.

1 would make things easier specification-wise and helps you understand
more of the API by just looking at the IDL, but I no longer consider 2
unworkable.


-- 
http://annevankesteren.nl/

Received on Sunday, 28 July 2013 19:27:36 UTC