Re: one more CSSStyleDeclaration problem

David Flanagan wrote:
> 
> The CSSStyleDeclaration.setProperty() method specification does not
> restrict the method to only setting the values of CSS properties that
> are already specified in the style declaration, so I assume that it can
> also be used to add new CSS properties and their values to the style
> declaration.
> 
> The problem is, however, that when it is used to add new properties, it
> does not specify where the new property name gets put in the list of
> names that is indexed by the item() method.
> 
> Since the item() method is not guaranteed to return names in source-code
> order, I'm assuming that the intent is that this may be backed by a set
> or hashtable implementation.  In this case, adding a new property to the
> set could totally shuffle the order in which the property names are
> returned by item()... If this is the intent, it needs to be stated
> explicitly.  

This is the intent. item() is there to iterate through the list of properties
without invoking getProperty for all possible CSS property names. A note seems
appropriate in the spec.

Philippe

Received on Tuesday, 21 August 2001 17:33:36 UTC