- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 17 May 2011 00:47:19 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv5494
Modified Files:
spec.html the-end.html
Log Message:
Update some examples in line with spec changes. (whatwg r6141)
[updated by splitter]
Index: the-end.html
===================================================================
RCS file: /sources/public/html5/spec/the-end.html,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- the-end.html 13 May 2011 04:47:11 -0000 1.48
+++ the-end.html 17 May 2011 00:47:17 -0000 1.49
@@ -785,38 +785,35 @@
is inserted <em>into the outer <code><a href="infrastructure.html#document">Document</a></code>
object</em>.</p>
- <p>This also means that the <a href="webappapis.html#script-s-global-object">script's global object</a> is
- the outer <a href="browsers.html#browsing-context">browsing context</a>'s <code><a href="browsers.html#window">Window</a></code>
- object, <em>not</em> the <code><a href="browsers.html#window">Window</a></code> object inside the
- <code><a href="the-iframe-element.html#the-iframe-element">iframe</a></code>.</p>
-
- <p class="note">This isn't a security problem since the script that
- moves the <code><a href="grouping-content.html#the-div-element">div</a></code> into the outer <code><a href="infrastructure.html#document">Document</a></code> can
- only do so because the two <code><a href="infrastructure.html#document">Document</a></code> object have the
- same <a href="origin-0.html#origin">origin</a>.</p>
-
- <p>Thus, the first alert says "http://example.com/outer".</p>
+ <p>This parsed into different <code><a href="infrastructure.html#document">Document</a></code>s than the one
+ the parser was created for do not execute, so the first alert does
+ not show.</p>
<p>Once the <code><a href="grouping-content.html#the-div-element">div</a></code> element's end tag is parsed, the
<code><a href="grouping-content.html#the-div-element">div</a></code> element is popped off the stack, and so the next
<code><a href="scripting-1.html#the-script-element">script</a></code> element is in the inner <code><a href="infrastructure.html#document">Document</a></code>:</p>
- <ul class="domTree"><li class="t1"><code><a href="semantics.html#the-html-element">html</a></code><ul><li class="t1"><code><a href="semantics.html#the-head-element">head</a></code></li><li class="t1"><code><a href="sections.html#the-body-element">body</a></code><ul><li class="t1"><code><a href="scripting-1.html#the-script-element">script</a></code><ul><li class="t3"><code>#text</code>: <span title="">alert(document.URL);</span></li></ul></li></ul></li></ul></li></ul><p>This second alert will say "http://example.com/inner".</p>
+ <ul class="domTree"><li class="t1"><code><a href="semantics.html#the-html-element">html</a></code><ul><li class="t1"><code><a href="semantics.html#the-head-element">head</a></code></li><li class="t1"><code><a href="sections.html#the-body-element">body</a></code><ul><li class="t1"><code><a href="scripting-1.html#the-script-element">script</a></code><ul><li class="t3"><code>#text</code>: <span title="">alert(document.URL);</span></li></ul></li></ul></li></ul></li></ul><p>This script does execute, resulting in an alert that says "http://example.com/inner".</p>
<h5 id="the-execution-of-scripts-that-are-moving-across-multiple-documents"><span class="secno">8.2.8.5 </span>The execution of scripts that are moving across multiple documents</h5>
<p><i>This section is non-normative.</i></p>
- <p>Elaborating on the example in the previous section, consider a
- case where a <code><a href="scripting-1.html#the-script-element">script</a></code> element with a <code title="attr-script-src"><a href="scripting-1.html#attr-script-src">src</a></code> attribute is parsed, but while
- the external script is being downloaded, the element is moved to
- another document.</p>
+ <p>Elaborating on the example in the previous section, consider the
+ case where the second <code><a href="scripting-1.html#the-script-element">script</a></code> element is an external
+ script (i.e. one with a <code title="attr-script-src"><a href="scripting-1.html#attr-script-src">src</a></code>
+ attribute). Since the element was not in the parser's
+ <code><a href="infrastructure.html#document">Document</a></code> when it was created, that external script is
+ not even downloaded.</p>
- <p>In this case, the <a href="webappapis.html#script-s-global-object">script's global object</a> is that
- second document's <a href="browsers.html#browsing-context">browsing context</a>'s
- <code><a href="browsers.html#window">Window</a></code> object, not the <code><a href="browsers.html#window">Window</a></code> object of
- the document into which the element was parsed.</p>
+ <p>In a case where a <code><a href="scripting-1.html#the-script-element">script</a></code> element with a <code title="attr-script-src"><a href="scripting-1.html#attr-script-src">src</a></code> attribute is parsed normally into
+ its parser's <code><a href="infrastructure.html#document">Document</a></code>, but while the external script is
+ being downloaded, the element is moved to another document, the
+ script continues to download, but does not execute.</p>
+
+ <p class="note">In general, moving <code><a href="scripting-1.html#the-script-element">script</a></code> elements
+ between <code><a href="infrastructure.html#document">Document</a></code>s is considered a bad practice.</p>
Index: spec.html
===================================================================
RCS file: /sources/public/html5/spec/spec.html,v
retrieving revision 1.1499
retrieving revision 1.1500
diff -u -d -r1.1499 -r1.1500
--- spec.html 16 May 2011 23:46:52 -0000 1.1499
+++ spec.html 17 May 2011 00:47:17 -0000 1.1500
@@ -384,7 +384,7 @@
<a href="Overview.html">single page HTML</a>,
<a href="spec.html">multipage HTML</a>,
<a href="author/">web developer edition</a>.
-This is revision 1.4939.
+This is revision 1.4940.
</p>
<p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
© 2011 <a href="http://www.w3.org/"><abbr title="World Wide
Received on Tuesday, 17 May 2011 00:47:26 UTC