Re: Fwd: [cssom-view] small update

On Mon, 21 Apr 2008 21:11:00 +0200, Anne van Kesteren <annevk@opera.com>  
wrote:
> Garrett Smith wrote:
>> [...] The algorithm was backed by an example. Here it is again:
>>
>> <body style='position:relative' onload="alert(a.offsetParent ==  
>> document.body)">
>> <div id=a style='position:relative'>a</div>
>> </body>
>>
>> The intuitive outcome of the display would be an alert with the value  
>> 'true'.
>> However, CSSOM would make it so that the outcome would 'false' in the  
>> alert.
>
> Actually, per the CSSOM the outcome would be 'true'. Replacing  
> a.offsetParent with document.getElementById('a') I get 'true' in Firefox  
> and Opera in both quirks and standards mode.

Oops, I meant to say replacing it with

   document.getElementById('a').offsetParent

obviously.



-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Monday, 21 April 2008 19:18:01 UTC