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

Re: Questions about the CSSPrimitiveValue interface.

From: Blaine Brodie <bbrodie@savagesoftware.com>
Date: Wed, 21 Jun 2000 10:47:08 -0700
Message-id: <fc.0085846d000091070085846d0000906a.9122@savagesoftware.com>
To: www-dom@w3.org
> I have a question about the CSSPrimitiveValue's setStringValue() method
> 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\"" );
setStringValue(CSS_STRING, "this way" );

setStringValue(CSS_URL, "url(###)" );
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.

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

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:07 UTC