W3C home > Mailing lists > Public > www-style@w3.org > September 2013

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 25 Sep 2013 01:06:54 -0400
Message-ID: <52426F6E.5070204@mit.edu>
To: www-style@w3.org
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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:34 UTC