[whatwg] Node inDocument

Ryosuke Niwa rniwa at webkit.org
Thu Sep 1 19:37:59 PDT 2011

On Thu, Sep 1, 2011 at 6:56 PM, James Robinson <jamesr at google.com> wrote:
> What is the expected behavior for nodes in iframes?  IOW, with this sort of
> DOM:
> <body>
>  <iframe id="a">
>    <iframe id="b">
>      <div id="node">

Let me first assume that you meant #a is in body, #b is somewhere in the
contentDocument of #a, and #node is in the contentDocument of #b.  Then

what is the return value for:
> b.contentDocument.contains(node);

> document.contains(node);

are, respectively, true, false, and false.

- Ryosuke

More information about the whatwg mailing list