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

Re: Figuring out easier readonly interfaces

From: Mark S. Miller <erights@google.com>
Date: Wed, 16 Oct 2013 16:21:36 -0700
Message-ID: <CABHxS9hmQ2U-LrbGW_-vBz_j71Joe8KfuWTqtb8sWJgXgjWuWw@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: "robert@ocallahan.org" <robert@ocallahan.org>, Dirk Schulze <dschulze@adobe.com>, Anne van Kesteren <annevk@annevk.nl>, "Tab Atkins Jr." <jackalmage@gmail.com>, Allen Wirfs-Brock <allen@wirfs-brock.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Wed, Oct 16, 2013 at 3:23 PM, Simon Pieters <simonp@opera.com> wrote:

> 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.

No one said it did. That would be silly ;).

Read only means that, through this object, changes to some underlying state
can be observed but not caused. In order for changes to be observed, it
must be possible to cause those changes, but holding this object is not by
itself adequate to cause those changes.

> 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.

Exactly. The "object" in question is the user interface element, and the
"client" whose access restriction is being described it the user. By virtue
of having user-interface access to this input element, the user can observe
changes (that are caused by other means), but this access by itself does
not enable the user to cause these changes.

> 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).

Exactly.  Giving you node.firstChild.bind(node) gives you the ability to
sense changes to the node's first child but not the ability to cause these

> 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 23:22:05 UTC

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