W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2013

Re: Figuring out easier readonly interfaces

From: Simon Pieters <simonp@opera.com>
Date: Thu, 17 Oct 2013 00:23:27 +0200
To: "robert@ocallahan.org" <robert@ocallahan.org>, "Dirk Schulze" <dschulze@adobe.com>
Cc: "Anne van Kesteren" <annevk@annevk.nl>, "Mark S. Miller" <erights@google.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, "Allen Wirfs-Brock" <allen@wirfs-brock.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <op.w42i5dmiidj3kv@simons-macbook-pro.local>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:18 UTC