W3C home > Mailing lists > Public > public-html-comments@w3.org > March 2012

Moving an iframe in the DOM

From: John J Barton <johnjbarton@johnjbarton.com>
Date: Thu, 15 Mar 2012 21:31:08 -0700
Message-ID: <CAFAtnWxtNZ4hkggYxMAvnNus7-2ZzuMXkhyvhb3+LfSHTPqTpg@mail.gmail.com>
To: public-html-comments@w3.org
The HTML5 spec has:

"Removing an iframe from a Document does not cause its browsing
context to be discarded. . Indeed, an iframe's browsing context can
survive its original parent Document if its iframe is moved to another

To me this statement is ambiguous, since we don't know what 'not ...
discarded' or "survive' means.  Does 'survive' mean that the values in
the browsing context remain intact?  If the context were to say issue
setInterval based computations, would these continue?

I am doing the equivalent of:
  // sometime after the load event:

The second appendChild should remove the iframe element from the
document and then insert it under anotherElement. And it does.

However the properties of the window object that I set are not retained.

If I look at the value of iframe.contentWindow.editorInterface before
the second appendChild(), it has the values I defined in the iframe.

If I look at the value after the second appendChild() it is 'undefined'.

I can't tell from the spec if this is a bug or not. Do we know?

Received on Friday, 16 March 2012 04:31:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:28 UTC