W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

[webcomponents] insertion points and offsetParent

From: Alan Stearns <stearns@adobe.com>
Date: Sat, 23 Mar 2013 10:53:54 -0700
To: public-webapps <public-webapps@w3.org>
Message-ID: <CD733A41.36850%stearns@adobe.com>
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 Saturday, 23 March 2013 17:54:22 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:58 GMT