Re: Figuring out easier readonly interfaces

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