Re: [webcomponents] insertion points and offsetParent

Great minds think alike! Dominic started this discussion here just a
few days ago: http://lists.w3.org/Archives/Public/public-webapps/2013JanMar/0881.html

On Sat, Mar 23, 2013 at 10:53 AM, Alan Stearns <stearns@adobe.com> wrote:
> Hey all,
>
> I've been looking at the algorithm for offsetParent [1] in relation to
> fragmentation contexts [2], and a question came up on whether this
> attribute needs to take shadow boundaries into account.
>
> If I have this markup:
>
> <body is="x-something">
>     <div id="light-parent" style="position:relative">
>         <div id="foo"></div>
>     </div>
> </body>
>
> <element name="x-something" extends="body">
>     <template>
>         <div id="dark-parent" style="position:relative">
>             <content select="#foo"></content>
>         </div>
>         <content></content>
>     </template>
> </element>
>
>
> And I have script that asks for foo.offsetParent, I expect that it should
> never return light-parent. But does it matter where the script executes?
> If the script tag is within the custom element it should return
> dark-parent, I think. But if the script tag is outside the shadow boundary
> should it return the body element?
>
> Thanks,
>
> Alan
>
> [1]
> http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
> [2] http://lists.w3.org/Archives/Public/www-style/2013Mar/0459.html
>
>

Received on Sunday, 24 March 2013 03:09:59 UTC