Re: Comments in svg.idl (SVG1.1)

At 01:03 PM 10/31/2004 +0000, Jim Ley wrote:

>Hi,
>
>In a recent discussion about the SVG1.1 DOM [1] some confusion about the
>SVGLength (amoung others)
>
>http://www.w3.org/TR/SVG11/idl.html
>
>interface SVGLength {
>     readonly attribute unsigned short unitType;
>              attribute float          value;
>                          // raises DOMException on setting
>}
>
>The problem here is exactly what the comment there means,

It means that setter method can raise an exception, not that it always 
raises exception on setting. It is similar to raise(...) on a method 
declaration (which does not mean that calling the method always raises an 
exception). We inherited this notation from Core DOM, I think.

Peter

>  and why if setting
>it raises a DOMException, why is it not just readonly?   Taking that comment
>as being right, this would mean that the SVGDom was entirely read only as
>any attempt to change would not be there.
>
>The ECMAScript IDL doesn't have the same restrictions.  Should these
>comments really be in the IDL, and if they should, what are they trying to
>say?
>
>Cheers,
>
>Jim.
>
>[1] http://svg.jibbering.com/svg/2004-10-31.html#T13-04-17

Received on Sunday, 31 October 2004 23:14:40 UTC