Skip to content

Commit

Permalink
Make the adopt hook more generic. https://www.w3.org/Bugs/Public/show…
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Feb 10, 2014
1 parent 8b87826 commit e50fd71
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 22 deletions.
24 changes: 14 additions & 10 deletions Overview.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -3532,14 +3532,14 @@ <h3>Interface <code>Node</code></h3>

<div class=impl>

<p>Specifications may define
<p><span title="Other applicable specifications">Specifications</span> may define
<dfn title=concept-node-clone-ext>cloning steps</dfn> for all or some
<span title=concept-node>nodes</span>. The algorithm is passed <var title>copy</var>,
<var title>node</var>, <var title>document</var>, and optionally a
<i title>clone children flag</i>, as indicated in the
<span title=concept-node-clone>clone</span> algorithm.

<p class=note>HTML defines
<p class="note no-backref">HTML defines
<span title=concept-node-clone-ext>cloning steps</span> for
<code data-anolis-spec=html>script</code> and
<code data-anolis-spec=html>input</code> elements. SVG ought to do the same
Expand Down Expand Up @@ -4702,10 +4702,19 @@ <h3>Interface <code>Document</code></h3>
<i title>clone children flag</i> set if <var title>deep</var> is true.
</ol>

<p><span title="Other applicable specifications">Specifications</span> may define
<dfn title=concept-node-adopt-ext>adopting steps</dfn> for all or some
<span title=concept-node>nodes</span>. The algorithm is passed <var title>node</var> and
<var title>oldDocument</var>, as indicated in the
<span class=no-backref title=concept-node-adopt>adopt</span> algorithm.

<p>To <dfn title=concept-node-adopt>adopt</dfn> a <var title>node</var> into
a <var title>document</var>, run these steps:

<ol>
<li><p>Let <var title>oldDocument</var> be <var title>node</var>'s
<span title=concept-node-document>node document</span>.

<li><p>If <var title>node</var>'s
<span title=concept-tree-parent>parent</span> is not null,
<span title=concept-node-remove>remove</span> <var title>node</var> from
Expand All @@ -4716,9 +4725,9 @@ <h3>Interface <code>Document</code></h3>
<span title=concept-node-document>node document</span> to <var title>document</var>.
<!--AttrExodus as well as any associated <code>Attr</code> nodes-->

<li><p>For each <span title=concept-element>element</span> in <var title>node</var>'s
<span title=concept-tree-inclusive-descendant>inclusive descendants</span>, run the
<span>base URL change steps</span>.
<li><p>Run any <span title=concept-node-adopt-ext>adopting steps</span> defined for
<var title>node</var> in <span>other applicable specifications</span> and pass
<var title>node</var> and <var title>oldDocument</var> as parameters.
</ol>

<p>The
Expand Down Expand Up @@ -5494,11 +5503,6 @@ <h3>Interface <code>Element</code></h3>

<hr>

<p><span>Other applicable specifications</span> may define
<dfn>base URL change steps</dfn> for an <span title=concept-element>element</span>.

<hr>

<dl class=domintro>
<dt><var title>namespace</var> = <var title>element</var> . <code title=dom-Element-namespaceURI>namespaceURI</code>
<dd><p>Returns the <span title=concept-element-namespace>namespace</span>.
Expand Down
28 changes: 16 additions & 12 deletions dom-core.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<p><a class="logo" href="//www.whatwg.org/"><img alt="WHATWG" height="100" src="//resources.whatwg.org/logo-dom.svg" width="100"></a></p>

<h1>DOM</h1>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-7-february-2014">Living Standard — Last Updated 7 February 2014</h2>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-10-february-2014">Living Standard — Last Updated 10 February 2014</h2>

<dl>
<dt>This Version:
Expand Down Expand Up @@ -45,7 +45,7 @@ <h2 class="no-num no-toc" id="living-standard-—-last-updated-7-february-2014">
<p class="copyright"><a href="http://creativecommons.org/publicdomain/zero/1.0/" rel="license"><img alt="CC0" src="http://i.creativecommons.org/p/zero/1.0/80x15.png"></a>
To the extent possible under law, the editors have waived all copyright and
related or neighboring rights to this work. In addition, as of
7 February 2014, the editors have made this specification available
10 February 2014, the editors have made this specification available
under the
<a href="http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0" rel="license">Open Web Foundation Agreement Version 1.0</a>,
which is available at
Expand Down Expand Up @@ -3606,14 +3606,14 @@ <h3 id="interface-node"><span class="secno">5.4 </span>Interface <code><a href="

<div class="impl">

<p>Specifications may define
<p><a href="#other-applicable-specifications" title="Other applicable specifications">Specifications</a> may define
<dfn id="concept-node-clone-ext" title="concept-node-clone-ext">cloning steps</dfn> for all or some
<a href="#concept-node" title="concept-node">nodes</a>. The algorithm is passed <var title="">copy</var>,
<var title="">node</var>, <var title="">document</var>, and optionally a
<i title="">clone children flag</i>, as indicated in the
<a href="#concept-node-clone" title="concept-node-clone">clone</a> algorithm.

<p class="note">HTML defines
<p class="note no-backref">HTML defines
<a href="#concept-node-clone-ext" title="concept-node-clone-ext">cloning steps</a> for
<code class="external" data-anolis-spec="html"><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#the-script-element">script</a></code> and
<code class="external" data-anolis-spec="html"><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#the-input-element">input</a></code> elements. SVG ought to do the same
Expand Down Expand Up @@ -4771,10 +4771,19 @@ <h3 id="interface-document"><span class="secno">5.5 </span>Interface <code><a hr
<i title="">clone children flag</i> set if <var title="">deep</var> is true.
</ol>

<p><a href="#other-applicable-specifications" title="Other applicable specifications">Specifications</a> may define
<dfn id="concept-node-adopt-ext" title="concept-node-adopt-ext">adopting steps</dfn> for all or some
<a href="#concept-node" title="concept-node">nodes</a>. The algorithm is passed <var title="">node</var> and
<var title="">oldDocument</var>, as indicated in the
<a class="no-backref" href="#concept-node-adopt" title="concept-node-adopt">adopt</a> algorithm.

<p>To <dfn id="concept-node-adopt" title="concept-node-adopt">adopt</dfn> a <var title="">node</var> into
a <var title="">document</var>, run these steps:

<ol>
<li><p>Let <var title="">oldDocument</var> be <var title="">node</var>'s
<a href="#concept-node-document" title="concept-node-document">node document</a>.

<li><p>If <var title="">node</var>'s
<a href="#concept-tree-parent" title="concept-tree-parent">parent</a> is not null,
<a href="#concept-node-remove" title="concept-node-remove">remove</a> <var title="">node</var> from
Expand All @@ -4785,9 +4794,9 @@ <h3 id="interface-document"><span class="secno">5.5 </span>Interface <code><a hr
<a href="#concept-node-document" title="concept-node-document">node document</a> to <var title="">document</var>.
<!--AttrExodus as well as any associated <code>Attr</code> nodes-->

<li><p>For each <a href="#concept-element" title="concept-element">element</a> in <var title="">node</var>'s
<a href="#concept-tree-inclusive-descendant" title="concept-tree-inclusive-descendant">inclusive descendants</a>, run the
<a href="#base-url-change-steps">base URL change steps</a>.
<li><p>Run any <a href="#concept-node-adopt-ext" title="concept-node-adopt-ext">adopting steps</a> defined for
<var title="">node</var> in <a href="#other-applicable-specifications">other applicable specifications</a> and pass
<var title="">node</var> and <var title="">oldDocument</var> as parameters.
</ol>

<p>The
Expand Down Expand Up @@ -5560,11 +5569,6 @@ <h3 id="interface-element"><span class="secno">5.8 </span>Interface <code><a hre

<hr>

<p><a href="#other-applicable-specifications">Other applicable specifications</a> may define
<dfn id="base-url-change-steps">base URL change steps</dfn> for an <a href="#concept-element" title="concept-element">element</a>.

<hr>

<dl class="domintro">
<dt><var title="">namespace</var> = <var title="">element</var> . <code title="dom-Element-namespaceURI"><a href="#dom-element-namespaceuri">namespaceURI</a></code>
<dd><p>Returns the <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a>.
Expand Down

0 comments on commit e50fd71

Please sign in to comment.