Clarification of readonly attributes

For the purpose of example I'll use SVGAnimatedLength in this
mail, but other SVG types have the same general pattern.

Cut&paste selected bits of the IDL:

  interface SVGFooElement {
    readonly attribute SVGAnimatedLength x;
  };

  interface SVGAnimatedLength { 
    readonly attribute SVGLength baseVal;
    readonly attribute SVGLength animVal;
  };

  interface SVGLength { 
    attribute float value;   // raises DOMException on setting
  };

The IDL prose for SVGLength states:

   float value

       The value as an floating point value, in user
       units. Setting this attribute will cause
       valueInSpecifiedUnits and valueAsString to be updated
       automatically to reflect this setting.

     Exceptions on setting

        DOMException NO_MODIFICATION_ALLOWED_ERR: Raised on an
        attempt to change the value of a readonly attribute.

Since the attributes are readonly down to the scalar level, does
that mean that the value of x can't be modified by anything other
than setAttribute?  As in, should "fooInstance.x.baseVal.value = 42"
throw an exception?

Received on Friday, 19 November 2004 05:26:13 UTC