Definition of DOMString

Hi.

In DOM Level 1, DOMString is defined as:

  typedef sequence<unsigned short> DOMString;

while in DOM Level 2 (and 3) Core, it is:

  valuetype DOMString sequence<unsigned short>;

Why was this change made?  Did it have any practical effect?

As far as I can tell, valuetypes are equivalent to classes, and the
boxed valuetype above is like declaring a class called DOMString with a
single member which is a sequence<unsigned short>.  Sequences are
already passed by value I think, so it doesn’t seem to be any different.

I’m trying to understand this so I can provide a consistent mapping of
sequences to ECMAScript in Web API’s “ECMAScript Binding for DOM
Specifications” document.

(I guess I might have to special case mapping DOMString to an ES string
value anyway.)

Thanks,

Cameron

-- 
Cameron McCormack, http://mcc.id.au/
 xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

Received on Friday, 18 May 2007 08:28:57 UTC