Re: [cssom] CSS Value API

On 4/7/10 5:08 AM, Anne van Kesteren wrote:
>> And throws if the "wrong" one is accessed?
>
> I think when it can be converted we should allow for that.

OK.

>>> ele.style.margin.l[0].px++ // increases the px value of the first item
>>
>> So of margin-top? What if it was set to "15%"? Throw?
>
> Why should it throw?

Well, what should it do if it doesn't throw?

> The idea is that it sets the first value of the shorthand

That's fine.  My specific question is:

   <div id="x" style="margin-top: 15%">
   <script>
     document.getElementById("x").style.margin.l[0].px++;
     // What just happened in the line above?
   </script>

-Boris

Received on Wednesday, 7 April 2010 13:35:11 UTC