Re: [matrix][cssom-view] DOMPoint, DOMPointLiteral definitions

On 9/25/13 1:02 AM, Dirk Schulze wrote:
> Are we discussing if the attributes(whole object) is immutable in certain situations or in general? I would not agree that DOMRect should always be immutable or that bottom/right should always be immutable. That should only be the case for live DOMRect objects where modifying these two attributes is not possible. And in these situations it is enough to have a prose saying that the returned object is immutable (or certain attributes).

This is actually hard-ish to do in prose right now.

The _right_ behavior for an immutable accessor property is to have a 
getter and no setter.  This will throw on sets in strict mode and 
silently no-op in non-strict mode.

That behavior is impossible to specify in prose: by the time your setter 
has been invoked, you have no way to tell what mode the caller was in.

Again, the right solution to this sort of issue is to have separate 
interfaces for the two different behaviors.  In my opinion.

-Boris

Received on Wednesday, 25 September 2013 05:07:23 UTC