W3C home > Mailing lists > Public > www-style@w3.org > April 2008

Re: Fwd: [cssom-view] small update

From: Anne van Kesteren <annevk@opera.com>
Date: Mon, 21 Apr 2008 21:17:31 +0200
To: "Garrett Smith" <dhtmlkitchen@gmail.com>
Cc: Www-style <www-style@w3.org>
Message-ID: <op.t9y6jht564w2qv@annevk-t60.oslo.opera.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:05 GMT