Moving an iframe in the DOM

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
Document."

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:
  document.body.appendChild(iframe);
  // sometime after the load event:
  anotherElement.appendChild(iframe);

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?

jjb

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