Skip to content

Commit 4f438d5

Browse files
authored
Add an explanation of active vs. fully active documents
1 parent 39c948b commit 4f438d5

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

source

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77042,6 +77042,60 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
7704277042
browsing context">child browsing contexts</span> of elements that are in <code>Document</code>s
7704377043
that are not themselves <span>fully active</span>.</p>
7704477044

77045+
<div class="example">
77046+
<p>The following example illustrates the differences between <span data-x="active
77047+
document">active</span> and <span>fully active</span> <code>Document</code> objects. Here <code
77048+
data-x="">a.html</code> is loaded into a browser window, <code data-x="">b-1.html</code> starts
77049+
out loaded into an <code>iframe</code> as shown, and <code data-x="">b-2.html</code> and <code
77050+
data-x="">c.html</code> are omitted (they can simply be an empty document).</p>
77051+
77052+
<pre>&lt;!-- a.html -->
77053+
&lt;!DOCTYPE html>
77054+
&lt;html lang="en">
77055+
&lt;title>Browsing context A&lt;/title>
77056+
77057+
&lt;iframe src="b-1.html">&lt;/iframe>
77058+
&lt;button onclick="frames[0].location.href = 'b-2.html'">Click me&lt;/button>
77059+
77060+
&lt;!-- b-1.html -->
77061+
&lt;!DOCTYPE html>
77062+
&lt;html lang="en">
77063+
&lt;title>Browsing context B&lt;/title>
77064+
77065+
&lt;iframe src="c.html">&lt;/iframe></pre>
77066+
77067+
<p>At this point, the documents given by <code data-x="">a.html</code>, <code
77068+
data-x="">b-1.html</code>, and <code data-x="">c.html</code> are all the <span data-x="active
77069+
document">active documents</span> of their respective <span data-x="concept-document-bc">browsing
77070+
contexts</span>. They are also all <span>fully active</span>.</p>
77071+
77072+
<p>After clicking on the <code>button</code>, and thus loading a new <code>Document</code> from
77073+
<code data-x="">b-2.html</code> into browsing context B, we have the following results:</p>
77074+
77075+
<ul>
77076+
<li><p>The <code data-x="">a.html</code> <code>Document</code> remains both the <span>active
77077+
document</span> of browsing context A, and <span>fully active</span>.</p></li>
77078+
77079+
<li><p>The <code data-x="">b-1.html</code> <code>Document</code> is now <em>not</em> the
77080+
<span>active document</span> of browsing context B. As such it is also not <span>fully
77081+
active</span>.</p></li>
77082+
77083+
<li><p>The new <code data-x="">b-2.html</code> <code>Document</code> is now the <span>active
77084+
document</span> of browsing context B, and is also <span>fully active</span>.</p></li>
77085+
77086+
<li><p>The <code data-x="">c.html</code> <code>Document</code> is still the <span>active
77087+
document</span> of browsing context C. However, since it is <span data-x="browsing context
77088+
nested through">nested through</span> the <code data-x="">b-1.html</code> <code>Document</code>,
77089+
which is itself not <span>fully active</span>, this means the <code data-x="">c.html</code>
77090+
<code>Document</code> is now not <span>fully active</span> (even though it is <span
77091+
data-x="active document">active</span>).</p></li>
77092+
</ul>
77093+
77094+
<p>For more explorations of the complexities involved here, especially as it impacts <a
77095+
href="#history">the session history</a>, see <cite>A Model of Navigation History</cite>. <ref
77096+
spec=NAVMODEL></p>
77097+
</div>
77098+
7704577099
<p>A <span>browsing context</span> that is a <span>nested browsing context</span> can be put into
7704677100
a <dfn>delaying <code data-x="event-load">load</code> events mode</dfn>. This is used when it is
7704777101
<span data-x="navigate">navigated</span>, to <span>delay the load event</span> of its
@@ -120275,6 +120329,9 @@ INSERT INTERFACES HERE
120275120329
<dt id="refsMQ">[MQ]</dt>
120276120330
<dd><cite><a href="https://drafts.csswg.org/mediaqueries/">Media Queries</a></cite>, H. Lie, T. &Ccedil;elik, D. Glazman, A. van Kesteren. W3C.</dd>
120277120331

120332+
<dt id="refsNAVMODEL">[NAVMODEL]</dt>
120333+
<dd><cite><a href="https://arxiv.org/abs/1608.05444">A Model of Navigation History</a></cite>. C. Brewster, A. Jeffrey.</dd>
120334+
120278120335
<dt id="refsNPAPI">[NPAPI]</dt>
120279120336
<dd>(Non-normative) <cite><a href="https://developer.mozilla.org/en-US/docs/Plugins/Guide">Gecko Plugin API Reference</a></cite>. Mozilla.</dd>
120280120337

0 commit comments

Comments
 (0)