Skip to content
Permalink
Browse files

[giow] (2) Clarify that the cloning that occurs for importNode() is t…

…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 d7595410baf5ab84b578810c722289da898a6815
Showing with 102 additions and 69 deletions.
  1. +31 −21 complete.html
  2. +31 −21 index
  3. +40 −27 source
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>

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>
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>


<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>


<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>


<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>


<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
52 index
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>

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>
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>


<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>


<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>


<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>


<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

0 comments on commit d759541

Please sign in to comment.
You can’t perform that action at this time.