Re: Figuring out easier readonly interfaces

On Wed, 16 Oct 2013 22:13:28 +0200, Dirk Schulze <dschulze@adobe.com>  
wrote:

>
> On Oct 14, 2013, at 10:01 PM, Robert O'Callahan <robert@ocallahan.org>  
> wrote:
>
>> How about "DOMRectRead"? Is that acceptable to everyone?
>
> If others accept this compromise it is fine with me.

My knee-jerk reaction is: it looks silly, and the argument about the  
semantics of "only" is also silly.

Readonly doesn't mean immutable or constant.

For example, <input readonly> means that the user can only read the value,  
but the value can still be mutated by script or by the UA.

Node#firstChild is a readonly attribute (WebIDL term), which means that a  
script can't change it by setting Node#firstChild, but the value can  
change by e.g. invoking Node#insertBefore() or by the UA changing the DOM  
(e.g. parsing).

SVGRect has a "read only" flag, which means that setting its attributes  
throws, but the values can still be changed. SVGAnimatedRect#animVal  
changes over time while the animation is running, but the SVGRect is "read  
only".

-- 
Simon Pieters
Opera Software

Received on Wednesday, 16 October 2013 22:24:02 UTC