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: Fri, 18 Oct 2013 00:48:29 +0200
To: "Mark S. Miller" <erights@google.com>, "James Graham" <james@hoppipolla.co.uk>, "Domenic Denicola" <domenic@domenicdenicola.com>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <op.w44ey3otidj3kv@simons-macbook-pro.local>
On Thu, 17 Oct 2013 22:45:50 +0200, Domenic Denicola  
<domenic@domenicdenicola.com> wrote:

> I think some example code helps this discussion. From what I can tell,  
> Mark is concerned about code like this:
>
> ```js
> if (rect instanceof DOMRectReadOnly) {
>   // ok, it's read only, so only its creator can write it
>   untrustedCode.doSomethingWithRect(rect);
>   // I can assume that rect has not change.
> }
> ```

I think renaming doesn't really do much to ensure that the above situation  
doesn't materialize. If we want to avoid it, it's better to have  
completely separated interfaces.

-- 
Simon Pieters
Opera Software
Received on Thursday, 17 October 2013 22:49:05 UTC

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