RE: DOM-2 CSSPrimitiveValue

:"An instance of this interface can be obtained from the 
:getPropertyCSSValue method of the CSSStyleDeclaration interface."
:
:This is a bit misleading. The getPropertyCSSValue method 
:return type is specified to be CSSValue, not 
:CSSPrimitiveValue. I think you want to say here something like:

Given that CSSPrimitiveValue is a kind of CSSValue, you can use
CSSValue.getValueType() to determine which type the returned item is and
perform a language specific cast against that. So the type is knowable
without a cast. Perhaps the comment should read:

"An instance of this interface *may* be obtained from the 
getPropertyCSSValue method of the CSSStyleDeclaration interface."


--------------------------------------------------------------------
    Bill de hOra    :    Cromwell Media    :    London

  bill@cromwellmedia.co.uk  :  +44 (0)20 8817 4039  
--------------------------------------------------------------------

             

Received on Wednesday, 29 March 2000 11:56:59 UTC