Skip to content

Commit

Permalink
[giow] (2) Clarify that the cloning that occurs for importNode() is t…
Browse files Browse the repository at this point in the history
…he same as occurs for cloneNode().

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=11091

git-svn-id: http://svn.whatwg.org/webapps@5863 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 9, 2011
1 parent 3accfd8 commit d759541
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 69 deletions.
52 changes: 31 additions & 21 deletions complete.html
Expand Up @@ -2808,6 +2808,13 @@ <h4 id=dom-trees><span class=secno>2.1.3 </span>DOM trees</h4>
value, text node, or string, means that the length of the text is
zero (i.e. not even containing spaces or control characters).</p>

<p>Nodes can be <dfn id=concept-clone title=concept-clone>cloned</dfn>, as
described in the DOM Core specification. For example, the <code title=dom-cloneNode>cloneNode()</code> and <code title=dom-importNode>importNode()</code> methods of the
<code><a href=#node>Node</a></code> interface both clone nodes, as do a number of
algorithms in this specification. Certain <a href=#html-elements>HTML elements</a>
(in particular, <code><a href=#the-input-element>input</a></code> and <code><a href=#script>script</a></code>) apply
additional requirements on how they are cloned. <a href=#refsDOMCORE>[DOMCORE]</a></p>


<h4 id=scripting-0><span class=secno>2.1.4 </span>Scripting</h4>

Expand Down Expand Up @@ -14878,8 +14885,8 @@ <h4 id=script><span class=secno>4.3.1 </span>The <dfn><code>script</code></dfn>
has been <dfn id=already-started>"already started"</dfn>. Initially,
<code><a href=#script>script</a></code> elements must have this flag unset (script
blocks, when created, are not "already started"). When a
<code><a href=#script>script</a></code> element is cloned, the "already started" flag,
if set, must be propagated to the clone when it is created.</p>
<code><a href=#script>script</a></code> element is <a href=#concept-clone title=concept-clone>cloned</a>, the "already started" flag, if
set, must be propagated to the clone when it is created.</p>

<p>The second is a flag indicating whether the element was
<dfn id=parser-inserted>"parser-inserted"</dfn>. Initially, <code><a href=#script>script</a></code>
Expand Down Expand Up @@ -40614,7 +40621,7 @@ <h4 id=the-input-element><span class=secno>4.10.7 </span>The <dfn><code>input</c
some cases (e.g. for the <a href=#date-state title=attr-input-type-date>Date</a> state, but not the <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> state) make an
<code><a href=#the-input-element>input</a></code> element <i title=concept-input-immutable><a href=#concept-input-immutable>immutable</a></i>.</p>

<p>When an <code><a href=#the-input-element>input</a></code> element is cloned, the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value flag</a>,
<p>When an <code><a href=#the-input-element>input</a></code> element is <a href=#concept-clone title=concept-clone>cloned</a>, the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value flag</a>,
<a href=#concept-fe-checked title=concept-fe-checked>checkedness</a>, and <a href=#concept-input-checked-dirty-flag title=concept-input-checked-dirty-flag>dirty checkedness
flag</a> must be propagated to the clone when it is created.</p>

Expand Down Expand Up @@ -57343,10 +57350,11 @@ <h4 id=atom><span class=secno>5.5.3 </span>Atom</h4>

<li>

<p>Clone the nodes in <var title="">heading content</var> and
their descendants into an environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting disabled</a>, has no
<a href=#plugin title=plugin>plugins</a>, and fails any attempt to
<a href=#fetch title=fetch>fetch</a> any resources. Let <var title="">cloned heading content</var> be a new
<p><a href=#concept-clone title=concept-clone>Clone</a> the nodes in <var title="">heading content</var> and their descendants into an
environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
resources. Let <var title="">cloned heading content</var> be a new
<code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting cloned
nodes, preserving their relative order.</p>

Expand Down Expand Up @@ -57381,12 +57389,13 @@ <h4 id=atom><span class=secno>5.5.3 </span>Atom</h4>

<ol><li>

<p>Clone the nodes in <var title="">subheading content</var>
and their descendants into an environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting disabled</a>, has no
<a href=#plugin title=plugin>plugins</a>, and fails any attempt to
<a href=#fetch title=fetch>fetch</a> any resources. Let <var title="">cloned subheading content</var> be a new
<code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting cloned
nodes, preserving their relative order.</p>
<p><a href=#concept-clone title=concept-clone>Clone</a> the nodes in <var title="">subheading content</var> and their descendants into an
environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
resources. Let <var title="">cloned subheading content</var> be
a new <code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting
cloned nodes, preserving their relative order.</p>

</li>

Expand Down Expand Up @@ -57493,12 +57502,13 @@ <h4 id=atom><span class=secno>5.5.3 </span>Atom</h4>

<li>

<p>Clone the nodes in <var title="">heading content</var> and
their descendants into an environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting disabled</a>, has no
<a href=#plugin title=plugin>plugins</a>, and fails any attempt to
<a href=#fetch title=fetch>fetch</a> any resources. Let <var title="">cloned heading content</var> be a new
<code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting cloned
nodes, preserving their relative order.</p>
<p><a href=#concept-clone title=concept-clone>Clone</a> the nodes in <var title="">heading content</var> and their descendants into an
environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
resources. Let <var title="">cloned heading content</var> be a
new <code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting
cloned nodes, preserving their relative order.</p>

</li>

Expand Down Expand Up @@ -57528,8 +57538,8 @@ <h4 id=atom><span class=secno>5.5.3 </span>Atom</h4>

<li>

<p>Clone <var title="">article</var> and its descendants into an
environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
<p><a href=#concept-clone title=concept-clone>Clone</a> <var title="">article</var> and its descendants into an environment
that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
resources. Let <var title="">cloned article</var> be the
Expand Down
52 changes: 31 additions & 21 deletions index
Expand Up @@ -2788,6 +2788,13 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
value, text node, or string, means that the length of the text is
zero (i.e. not even containing spaces or control characters).</p>

<p>Nodes can be <dfn id=concept-clone title=concept-clone>cloned</dfn>, as
described in the DOM Core specification. For example, the <code title=dom-cloneNode>cloneNode()</code> and <code title=dom-importNode>importNode()</code> methods of the
<code><a href=#node>Node</a></code> interface both clone nodes, as do a number of
algorithms in this specification. Certain <a href=#html-elements>HTML elements</a>
(in particular, <code><a href=#the-input-element>input</a></code> and <code><a href=#script>script</a></code>) apply
additional requirements on how they are cloned. <a href=#refsDOMCORE>[DOMCORE]</a></p>


<h4 id=scripting-0><span class=secno>2.1.4 </span>Scripting</h4>

Expand Down Expand Up @@ -14858,8 +14865,8 @@ c-end = "--&gt;"</pre>
has been <dfn id=already-started>"already started"</dfn>. Initially,
<code><a href=#script>script</a></code> elements must have this flag unset (script
blocks, when created, are not "already started"). When a
<code><a href=#script>script</a></code> element is cloned, the "already started" flag,
if set, must be propagated to the clone when it is created.</p>
<code><a href=#script>script</a></code> element is <a href=#concept-clone title=concept-clone>cloned</a>, the "already started" flag, if
set, must be propagated to the clone when it is created.</p>

<p>The second is a flag indicating whether the element was
<dfn id=parser-inserted>"parser-inserted"</dfn>. Initially, <code><a href=#script>script</a></code>
Expand Down Expand Up @@ -40597,7 +40604,7 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
some cases (e.g. for the <a href=#date-state title=attr-input-type-date>Date</a> state, but not the <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> state) make an
<code><a href=#the-input-element>input</a></code> element <i title=concept-input-immutable><a href=#concept-input-immutable>immutable</a></i>.</p>

<p>When an <code><a href=#the-input-element>input</a></code> element is cloned, the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value flag</a>,
<p>When an <code><a href=#the-input-element>input</a></code> element is <a href=#concept-clone title=concept-clone>cloned</a>, the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value flag</a>,
<a href=#concept-fe-checked title=concept-fe-checked>checkedness</a>, and <a href=#concept-input-checked-dirty-flag title=concept-input-checked-dirty-flag>dirty checkedness
flag</a> must be propagated to the clone when it is created.</p>

Expand Down Expand Up @@ -57326,10 +57333,11 @@ _:n2 hcard:adr%20street-address "Avenue Q" ;

<li>

<p>Clone the nodes in <var title="">heading content</var> and
their descendants into an environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting disabled</a>, has no
<a href=#plugin title=plugin>plugins</a>, and fails any attempt to
<a href=#fetch title=fetch>fetch</a> any resources. Let <var title="">cloned heading content</var> be a new
<p><a href=#concept-clone title=concept-clone>Clone</a> the nodes in <var title="">heading content</var> and their descendants into an
environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
resources. Let <var title="">cloned heading content</var> be a new
<code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting cloned
nodes, preserving their relative order.</p>

Expand Down Expand Up @@ -57364,12 +57372,13 @@ _:n2 hcard:adr%20street-address "Avenue Q" ;

<ol><li>

<p>Clone the nodes in <var title="">subheading content</var>
and their descendants into an environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting disabled</a>, has no
<a href=#plugin title=plugin>plugins</a>, and fails any attempt to
<a href=#fetch title=fetch>fetch</a> any resources. Let <var title="">cloned subheading content</var> be a new
<code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting cloned
nodes, preserving their relative order.</p>
<p><a href=#concept-clone title=concept-clone>Clone</a> the nodes in <var title="">subheading content</var> and their descendants into an
environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
resources. Let <var title="">cloned subheading content</var> be
a new <code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting
cloned nodes, preserving their relative order.</p>

</li>

Expand Down Expand Up @@ -57476,12 +57485,13 @@ _:n2 hcard:adr%20street-address "Avenue Q" ;

<li>

<p>Clone the nodes in <var title="">heading content</var> and
their descendants into an environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting disabled</a>, has no
<a href=#plugin title=plugin>plugins</a>, and fails any attempt to
<a href=#fetch title=fetch>fetch</a> any resources. Let <var title="">cloned heading content</var> be a new
<code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting cloned
nodes, preserving their relative order.</p>
<p><a href=#concept-clone title=concept-clone>Clone</a> the nodes in <var title="">heading content</var> and their descendants into an
environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
resources. Let <var title="">cloned heading content</var> be a
new <code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting
cloned nodes, preserving their relative order.</p>

</li>

Expand Down Expand Up @@ -57511,8 +57521,8 @@ _:n2 hcard:adr%20street-address "Avenue Q" ;

<li>

<p>Clone <var title="">article</var> and its descendants into an
environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
<p><a href=#concept-clone title=concept-clone>Clone</a> <var title="">article</var> and its descendants into an environment
that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
resources. Let <var title="">cloned article</var> be the
Expand Down

0 comments on commit d759541

Please sign in to comment.