W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2001

Re: one more CSSStyleDeclaration problem

From: Philippe Le Hegaret <plh@w3.org>
Date: Tue, 21 Aug 2001 17:33:35 -0400
Message-ID: <3B82D3AF.AF54204A@w3.org>
To: David Flanagan <david@oreilly.com>
Cc: www-dom@w3.org
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 GMT

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