Short URL: http://html5.org/r/7139
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 7139 | 2012-06-22 20:54 |
Index: source
===================================================================
--- source (revision 7138)
+++ source (revision 7139)
@@ -27548,12 +27548,24 @@
<div class="impl">
- <p>When an <code>iframe</code> element is first <span title="insert
- an element into a document">inserted into a document</span>, the
- user agent must create a <span>nested browsing context</span>, and
- then <span>process the <code>iframe</code> attributes</span> for the
+ <p>When an <code>iframe</code> element is <span title="insert an
+ element into a document">inserted into a document</span>, the user
+ agent must create a <span>nested browsing context</span>, and then
+ <span>process the <code>iframe</code> attributes</span> for the
first time.</p>
+ <p>When an <code>iframe</code> element is <span title="remove an
+ element from a document">removed from a document</span>, the user
+ agent must <span title="a browsing context is
+ discarded">discard</span> the <span>nested browsing
+ context</span>.</p>
+
+ <p class="note">This happens without any <code
+ title="event-unload">unload</code> events firing (the <span>nested
+ browsing context</span> and its <code>Document</code> are <em
+ title="a browsing context is discarded">discarded</em>, not <em
+ title="unload a document">unloaded</em>).</p>
+
<p>Whenever an <code>iframe</code> element with a <span>nested
browsing context</span> has its <code
title="attr-iframe-srcdoc">srcdoc</code> attribute set, changed, or
@@ -27675,35 +27687,6 @@
objects for new <code>Document</code> objects, but the <code
title="attr-iframe-src">src</code> attribute will not change.</p>
- <div class="impl">
-
- <div class="note">
-
- <p><span title="remove an element from a document">Removing</span>
- an <code>iframe</code> from a <code>Document</code> does not cause
- its <span>browsing context</span> to be discarded. Indeed, an
- <code>iframe</code>'s <span>browsing context</span> can survive its
- original parent <code>Document</code> if its <code>iframe</code> is
- moved to another <code>Document</code>.</p>
-
- <p>On the other hand, if an <code>iframe</code> is <span
- title="remove an element from a document">removed</span> from a
- <code>Document</code> and is then subsequently garbage collected,
- this will likely mean (in the absence of other references) that the
- <span>child browsing context</span>'s <code>WindowProxy</code>
- object will become eligble for garbage collection, which will then
- lead to that <span>browsing context</span> being <span title="a
- browsing context is discarded">discarded</span>, which will then
- lead to its <code>Document</code> being <span title="discard a
- document">discarded</span> also. This happens without notice to any
- scripts running in that <code>Document</code>; for example, no
- <code title="event-unload">unload</code> events are fired (the
- "<span>unload a document</span>" steps are not run).</p>
-
- </div>
-
- </div>
-
<div class="example">
<p>Here a blog uses the <code