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>


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.)



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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:36:54 UTC