Re: another minor ambiguity in DOM Level 2 CSS spec

David Flanagan wrote:
> CSSStyleDeclaration.setProperty() takes a priority argument which is
> described as "the new priority of the property".  The problem is that it
> does not specify what value should be passed for properties that have no
> priority specification.

> I'm guessing that an empty string is the intended value to indicate no
> priority.

I'm guessing that too.

> However, I'm not sure what the method should do if null is
> passed.  If this is an illegal value, I guess it should throw a
> SYNTAX_ERR exception.

No, we don't deal with null values in the DOM spec unless it is explicitly
specified. I would expect a Java implementation to throw a NullPointerException
for example.

Implementations should raise other exceptions under other circumstances. For
example, implementations should raise an implementation-dependent exception if
a null argument is passed when null was not expected.

> Can someone clarify this, please?

I add this issue on our list.


Received on Tuesday, 21 August 2001 17:30:56 UTC