Skip to content

Commit 85ff0b8

Browse files
committed
1 parent a165cb2 commit 85ff0b8

File tree

3 files changed

+433
-8
lines changed

3 files changed

+433
-8
lines changed

Overview.html

Lines changed: 146 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ <h2 class="no-num no-toc" id="table-of-contents">Table of Contents</h2>
130130
<li><a href="#node-tree"><span class="secno">5.1 </span>Node tree</a>
131131
<ol class="toc">
132132
<li><a href="#mutation-algorithms"><span class="secno">5.1.1 </span>Mutation algorithms</a></li>
133-
<li><a href="#legacy-mutation-methods"><span class="secno">5.1.2 </span>Legacy mutation methods</a></li>
134-
<li><a href="#mutation-observers"><span class="secno">5.1.3 </span>Mutation observers</a></ol></li>
133+
<li><a href="#mutation-methods"><span class="secno">5.1.2 </span>Mutation methods</a></li>
134+
<li><a href="#legacy-mutation-methods"><span class="secno">5.1.3 </span>Legacy mutation methods</a></li>
135+
<li><a href="#mutation-observers"><span class="secno">5.1.4 </span>Mutation observers</a></ol></li>
135136
<li><a href="#interface-node"><span class="secno">5.2 </span>Interface <code>Node</code></a></li>
136137
<li><a href="#interface-document"><span class="secno">5.3 </span>Interface <code>Document</code></a>
137138
<ol class="toc">
@@ -1556,7 +1557,121 @@ <h4 id="mutation-algorithms"><span class="secno">5.1.1 </span>Mutation algorithm
15561557
</ol>
15571558

15581559

1559-
<h4 id="legacy-mutation-methods"><span class="secno">5.1.2 </span>Legacy mutation methods</h4>
1560+
<h4 id="mutation-methods"><span class="secno">5.1.2 </span>Mutation methods</h4>
1561+
1562+
<p>The <dfn id="mutation-method-macro">mutation method macro</dfn>:
1563+
1564+
<ol>
1565+
<li><p>Let <var title="">node</var> be null.
1566+
1567+
<li><p>Replace each string in <var title="">nodes</var> with a
1568+
<code><a href="#text">Text</a></code> <a href="#concept-node" title="concept-node">node</a> whose
1569+
<span title="cocnept-CD-data">data</span> is the string value.
1570+
1571+
<li>
1572+
<p>If <var title="">nodes</var> contains more than one
1573+
<a href="#concept-node" title="concept-node">node</a>, set <var title="">node</var> to a new
1574+
<code><a href="#documentfragment">DocumentFragment</a></code> and
1575+
<a href="#concept-node-append" title="concept-node-append">append</a> each
1576+
<a href="#concept-node" title="concept-node">node</a> in <var title="">nodes</var> to it. If
1577+
this throws an exception, re-throw the exception and terminate these
1578+
steps.
1579+
1580+
<p>Otherwise, set <var title="">node</var> to the single
1581+
<a href="#concept-node" title="concept-node">node</a> <var title="">nodes</var> contains.
1582+
</ol>
1583+
1584+
1585+
<p>The
1586+
<dfn id="dom-rootnode-prepend" title="dom-RootNode-prepend"><code>prepend(<var>nodes</var>)</code></dfn>
1587+
method must run these steps:
1588+
1589+
<ol>
1590+
<li>Run the <a href="#mutation-method-macro">mutation method macro</a>.
1591+
1592+
<li><p><a href="#concept-node-pre-insert" title="concept-node-pre-insert">Pre-insert</a>
1593+
<var title="">node</var> into the <a href="#context-object">context object</a> before the
1594+
<a href="#context-object">context object</a>'s
1595+
<a href="#concept-tree-first-child" title="concept-tree-first-child">first child</a>
1596+
</ol>
1597+
1598+
<p>The
1599+
<dfn id="dom-rootnode-append" title="dom-RootNode-append"><code>append(<var>nodes</var>)</code></dfn>
1600+
method must run these steps:
1601+
1602+
<ol>
1603+
<li>Run the <a href="#mutation-method-macro">mutation method macro</a>.
1604+
1605+
<li><p><a href="#concept-node-append" title="concept-node-append">Append</a>
1606+
<var title="">node</var> to the <a href="#context-object">context object</a>.
1607+
</ol>
1608+
1609+
1610+
<p>The
1611+
<dfn id="dom-childnode-before" title="dom-ChildNode-before"><code>before(<var>nodes</var>)</code></dfn>
1612+
method must run these steps:
1613+
1614+
<ol>
1615+
<li><p>If the <a href="#context-object">context object</a> does not have a
1616+
<a href="#concept-tree-parent" title="concept-tree-parent">parent</a>, terminate these steps.
1617+
1618+
<li>Run the <a href="#mutation-method-macro">mutation method macro</a>.
1619+
1620+
<li><p><a href="#concept-node-pre-insert" title="concept-node-pre-insert">Pre-insert</a>
1621+
<var title="">node</var> into the <a href="#context-object">context object</a>'s
1622+
<a href="#concept-tree-parent" title="concept-tree-parent">parent</a> before the
1623+
<a href="#context-object">context object</a>.
1624+
</ol>
1625+
1626+
<p>The
1627+
<dfn id="dom-childnode-after" title="dom-ChildNode-after"><code>after(<var>nodes</var>)</code></dfn>
1628+
method must run these steps:
1629+
1630+
<ol>
1631+
<li><p>If the <a href="#context-object">context object</a> does not have a
1632+
<a href="#concept-tree-parent" title="concept-tree-parent">parent</a>, terminate these steps.
1633+
1634+
<li>Run the <a href="#mutation-method-macro">mutation method macro</a>.
1635+
1636+
<li><p><a href="#concept-node-pre-insert" title="concept-node-pre-insert">Pre-insert</a>
1637+
<var title="">node</var> into the <a href="#context-object">context object</a>'s
1638+
<a href="#concept-tree-parent" title="concept-tree-parent">parent</a> before the
1639+
<a href="#context-object">context object</a>'s
1640+
<a href="#concept-tree-next-sibling" title="concept-tree-next-sibling">next sibling</a>.
1641+
</ol>
1642+
1643+
<p>The
1644+
<dfn id="dom-childnode-replace" title="dom-ChildNode-replace"><code>replace(<var>nodes</var>)</code></dfn>
1645+
method must run these steps:
1646+
1647+
<ol>
1648+
<li><p>If the <a href="#context-object">context object</a> does not have a
1649+
<a href="#concept-tree-parent" title="concept-tree-parent">parent</a>, terminate these steps.
1650+
1651+
<li>Run the <a href="#mutation-method-macro">mutation method macro</a>.
1652+
1653+
<li><p><a href="#concept-node-replace" title="concept-node-replace">Replace</a> the
1654+
<a href="#context-object">context object</a> with <var title="">node</var> within the
1655+
<a href="#context-object">context object</a>'s
1656+
<a href="#concept-tree-parent" title="concept-tree-parent">parent</a>.
1657+
</ol>
1658+
1659+
<p>The
1660+
<dfn id="dom-childnode-remove" title="dom-ChildNode-remove"><code>remove()</code></dfn>
1661+
method must run these steps:
1662+
1663+
<ol>
1664+
<li><p>If the <a href="#context-object">context object</a> does not have a
1665+
<a href="#concept-tree-parent" title="concept-tree-parent">parent</a>, terminate these steps.
1666+
1667+
<li><p><a href="#concept-node-remove" title="concept-node-remove">Remove</a> the
1668+
<a href="#context-object">context object</a> from the
1669+
<a href="#context-object">context object</a>'s
1670+
<a href="#concept-tree-parent" title="concept-tree-parent">parent</a>.
1671+
</ol>
1672+
1673+
1674+
<h4 id="legacy-mutation-methods"><span class="secno">5.1.3 </span>Legacy mutation methods</h4>
15601675

15611676
<p>The
15621677
<dfn id="dom-node-insertbefore" title="dom-Node-insertBefore"><code>insertBefore(<var>node</var>, <var>child</var>)</code></dfn>
@@ -1581,7 +1696,7 @@ <h4 id="legacy-mutation-methods"><span class="secno">5.1.2 </span>Legacy mutatio
15811696
<var title="">child</var> from the <a href="#context-object">context object</a>.
15821697

15831698

1584-
<h4 id="mutation-observers"><span class="secno">5.1.3 </span>Mutation observers</h4>
1699+
<h4 id="mutation-observers"><span class="secno">5.1.4 </span>Mutation observers</h4>
15851700

15861701
<p class="XXX">This section will define the replacement for the
15871702
"Mutation Events" feature of the platform. For now it contains the interface
@@ -2730,6 +2845,10 @@ <h3 id="interface-document"><span class="secno">5.3 </span>Interface <code><a hr
27302845

27312846
<a href="#nodeiterator">NodeIterator</a> <a href="#dom-document-createnodeiterator" title="dom-Document-createNodeIterator">createNodeIterator</a>(<a href="#node">Node</a> <var title="">root</var>, optional unsigned long <var title="">whatToShow</var>, optional <a href="#nodefilter">NodeFilter</a>? <var title="">filter</var>);
27322847
<a href="#treewalker">TreeWalker</a> <a href="#dom-document-createtreewalker" title="dom-Document-createTreeWalker">createTreeWalker</a>(<a href="#node">Node</a> <var title="">root</var>, optional unsigned long <var title="">whatToShow</var>, optional <a href="#nodefilter">NodeFilter</a>? <var title="">filter</var>);
2848+
2849+
// NEW (using experimental IDL)
2850+
void <a href="#dom-rootnode-prepend" title="dom-RootNode-prepend">prepend</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
2851+
void <a href="#dom-rootnode-append" title="dom-RootNode-append">append</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
27332852
};
27342853

27352854
interface <dfn id="xmldocument">XMLDocument</dfn> : <a href="#document">Document</a> {};</pre>
@@ -3614,6 +3733,9 @@ <h4 id="interface-domimplementation"><span class="secno">5.3.1 </span>Interface
36143733

36153734
<h3 id="interface-documentfragment"><span class="secno">5.4 </span>Interface <code><a href="#documentfragment">DocumentFragment</a></code></h3>
36163735
<pre class="idl">interface <dfn id="documentfragment">DocumentFragment</dfn> : <a href="#node">Node</a> {
3736+
// NEW (using experimental IDL)
3737+
void <a href="#dom-rootnode-prepend" title="dom-RootNode-prepend">prepend</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
3738+
void <a href="#dom-rootnode-append" title="dom-RootNode-append">append</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
36173739
};</pre>
36183740

36193741

@@ -3626,6 +3748,12 @@ <h3 id="interface-documenttype"><span class="secno">5.5 </span>Interface <code><
36263748
readonly attribute DOMString <a href="#dom-documenttype-publicid" title="dom-DocumentType-publicId">publicId</a>;
36273749
readonly attribute DOMString <a href="#dom-documenttype-systemid" title="dom-DocumentType-systemId">systemId</a>;<!--
36283750
readonly attribute DOMString internalSubset;-->
3751+
3752+
// NEW (using experimental IDL)
3753+
void <a href="#dom-childnode-before" title="dom-ChildNode-before">before</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
3754+
void <a href="#dom-childnode-after" title="dom-ChildNode-after">after</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
3755+
void <a href="#dom-childnode-replace" title="dom-ChildNode-replace">replace</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
3756+
void <a href="#dom-childnode-remove" title="dom-ChildNode-remove">remove</a>();
36293757
};</pre>
36303758

36313759
<p><code><a href="#documenttype">DocumentType</a></code> <a href="#concept-node" title="concept-node">nodes</a> are
@@ -3748,6 +3876,14 @@ <h3 id="interface-element"><span class="secno">5.6 </span>Interface <code><a hre
37483876
void setIdAttribute(DOMString name, boolean isId);
37493877
void setIdAttributeNS(DOMString namespace, DOMString localName, boolean isId);
37503878
void setIdAttributeNode(Attr idAttr, boolean isId);-->
3879+
3880+
// NEW (using experimental IDL)
3881+
void <a href="#dom-rootnode-prepend" title="dom-RootNode-prepend">prepend</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
3882+
void <a href="#dom-rootnode-append" title="dom-RootNode-append">append</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
3883+
void <a href="#dom-childnode-before" title="dom-ChildNode-before">before</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
3884+
void <a href="#dom-childnode-after" title="dom-ChildNode-after">after</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
3885+
void <a href="#dom-childnode-replace" title="dom-ChildNode-replace">replace</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
3886+
void <a href="#dom-childnode-remove" title="dom-ChildNode-remove">remove</a>();
37513887
};</pre>
37523888

37533889
<p><code><a href="#element">Element</a></code> <a href="#concept-node" title="concept-node">nodes</a> are simply
@@ -4361,6 +4497,12 @@ <h3 id="interface-characterdata"><span class="secno">5.7 </span>Interface <code>
43614497
void <a href="#dom-characterdata-insertdata" title="dom-CharacterData-insertData">insertData</a>(unsigned long <var title="">offset</var>, DOMString <var title="">data</var>);
43624498
void <a href="#dom-characterdata-deletedata" title="dom-CharacterData-deleteData">deleteData</a>(unsigned long <var title="">offset</var>, unsigned long <var title="">count</var>);
43634499
void <a href="#dom-characterdata-replacedata" title="dom-CharacterData-replaceData">replaceData</a>(unsigned long <var title="">offset</var>, unsigned long <var title="">count</var>, DOMString <var title="">data</var>);
4500+
4501+
// NEW (using experimental IDL)
4502+
void <a href="#dom-childnode-before" title="dom-ChildNode-before">before</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
4503+
void <a href="#dom-childnode-after" title="dom-ChildNode-after">after</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
4504+
void <a href="#dom-childnode-replace" title="dom-ChildNode-replace">replace</a>(<a href="#node">Node</a> | DOMString... <var title="">nodes</var>);
4505+
void <a href="#dom-childnode-remove" title="dom-ChildNode-remove">remove</a>();
43644506
};</pre>
43654507

43664508
<p class="note"><code><a href="#characterdata">CharacterData</a></code> is an abstract interface and does

0 commit comments

Comments
 (0)