W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2010

Re: DOMString-like objects for the CSSOM

From: Mark S. Miller <erights@google.com>
Date: Fri, 19 Feb 2010 08:20:47 -0800
Message-ID: <4d2fac901002190820k1021864cw665879c75698b007@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
On Fri, Feb 19, 2010 at 8:15 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 2/19/10 11:06 AM, Mark S. Miller wrote:
>
>> Why make your new object be String-like rather than simply containing a
>> string as a member?
>>
>
> I think the reasoning is tat people use |foo.style.top| as a string right
> now.


Is it a string right now? If it is...


>  So if we want to allow doing |foo.style.top.px = 200|


Why would you want that? I suggest that once you appreciate the costs of
that desire, you will no longer want that.



> and at the same time allow people to treat foo.style.top as a string, then
> it needs to be string-like in some sense.
>
> I suspect that just having it toString to the string it is right now is not
> sufficient for web compatibility.
>
>
>  Why use is-a rather than has-a?
>>
>
> Because we're trying to extend a legacy API which currently uses strings,
> not designing in a vacuum.
>
> -Boris
>



-- 
    Cheers,
    --MarkM
Received on Friday, 19 February 2010 16:21:17 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:02 UTC