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

Re: Questions about the CSSPrimitiveValue interface.

From: Philippe Le Hegaret <plh@w3.org>
Date: Mon, 26 Jun 2000 11:24:43 -0400
Message-ID: <395775BB.5637BA7@w3.org>
To: Blaine Brodie <bbrodie@savagesoftware.com>
CC: www-dom@w3.org
Blaine Brodie wrote:
> Which of the following is the correct way to use setStringValue in the
> following cases?
> 
> setStringValue(CSS_STRING, "\"this way\"" );
> or
> setStringValue(CSS_STRING, "this way" );
> 
> setStringValue(CSS_URL, "url(###)" );
> or
> setStringValue(CSS_URL, "###" );
 
Our intent is to have:

setStringValue(CSS_STRING, "this way");
and
setStringValue(CSS_URI, "###");

The return value of getStringValue doesn't need to be parsed.

> > Also, what is expected to occur with CSSPrimitiveValue's
> > getPrimitiveType() method in the following case?  Assume I have a
> > CSSPrimitiveValue named 'primitiveValue'.  Also, assume that
> > primitiveValue's attached property can contain CSSValues of type
> > CSS_VALUE_LIST and CSS_PRIMITIVE_VALUE . What happens in the following
> >  situation?
> primitiveValue.setCssText("a, valid, list")     // no exception raised
> according to
>                                                 // current specification.
> primitiveValue.getValueType();          // now returns CSS_VALUE_LIST
> primitiveValue.getPrimitiveType() == ????.
> 
> ^^^Sorry added some information that I forgot about in my previous post.

This case appears on properties 'border-spacing', 'quotes',
'play-during', 'counter-increment', 'counter-reset', 'size', 
and 'text-shadow'.
It means that the implementation has to do a special handling for theses
cases. In your case, it would mean that getPrimitiveType() has an undefined
result since the value is no longer a primitive value.

Philippe
Received on Monday, 26 June 2000 11:24:56 GMT

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