Re: Questions about the CSSPrimitiveValue interface.

> I have a question about the CSSPrimitiveValue's setStringValue() method
in
> the current DOM2 specification.  The specification states that an
> INVALID_ACCESS_ERR exception is to be raised if the CSS value doesn't
> contain a string value or if the string value can't be converted into the
> specified unit.  Should this also say that it will be raised if the
> attached property doesn't support the string value or the unit type?
> 
I noticed that further up the method's description, this previous is
stated, so please ignore the previous question.  I do, however, have
another question about setStringValue().
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, "###" );

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

Blaine

Received on Wednesday, 21 June 2000 13:47:10 UTC