W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2007

Definition of DOMString

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 18 May 2007 18:28:44 +1000
To: www-dom@w3.org
Message-ID: <20070518082844.GA14430@arc.mcc.id.au>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:58 GMT