Skip to content

Commit

Permalink
Editorial: remove "rethrow any exception"
Browse files Browse the repository at this point in the history
It’s not needed per the Infra Standard as exceptions automatically
rethrow in a caller.

Fixes #209.
  • Loading branch information
annevk committed Mar 24, 2017
1 parent 16944b0 commit d298c5b
Showing 1 changed file with 33 additions and 38 deletions.
71 changes: 33 additions & 38 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ run these steps:
<ol>
<li>If <var>namespace</var> is the empty string, set it to null.

<li><a>Validate</a> <var>qualifiedName</var>. Rethrow any exceptions.
<li><a>Validate</a> <var>qualifiedName</var>.

<li>Let <var>prefix</var> be null.

Expand Down Expand Up @@ -2361,7 +2361,7 @@ To <dfn export lt="converting nodes into a node">convert nodes into a node</dfn>

<li><p>Otherwise, set <var>node</var> to a new {{DocumentFragment}} whose
<a for=Node>node document</a> is <var>document</var>, and then <a>append</a> each <a>node</a> in
<var>nodes</var>, if any, to it. Rethrow any exceptions.
<var>nodes</var>, if any, to it.

<li><p>Return <var>node</var>.
</ol>
Expand Down Expand Up @@ -2469,20 +2469,20 @@ must run these steps:

<ol>
<li><p>Let <var>node</var> be the result of <a>converting nodes into a node</a> given
<var>nodes</var> and <a>context object</a>'s <a for=Node>node document</a>. Rethrow any exceptions.
<var>nodes</var> and <a>context object</a>'s <a for=Node>node document</a>.

<li><p><a>Pre-insert</a> <var>node</var> into <a>context object</a> before the
<a>context object</a>'s <a for=tree>first child</a>. Rethrow any exceptions.
<a>context object</a>'s <a for=tree>first child</a>.
</ol>

<p>The <dfn method for=ParentNode><code>append(<var>nodes</var>)</code></dfn> method, when invoked,
must run these steps:

<ol>
<li><p>Let <var>node</var> be the result of <a>converting nodes into a node</a> given
<var>nodes</var> and <a>context object</a>'s <a for=Node>node document</a>. Rethrow any exceptions.
<var>nodes</var> and <a>context object</a>'s <a for=Node>node document</a>.

<li><p><a>Append</a> <var>node</var> to <a>context object</a>. Rethrow any exceptions.
<li><p><a>Append</a> <var>node</var> to <a>context object</a>.
</ol>

<!--The <dfn method for=ParentNode><code>query(<var>relativeSelectors</var>)</code></dfn>
Expand Down Expand Up @@ -2608,14 +2608,14 @@ must run these steps:
<a>preceding</a> <a for=tree>sibling</a> not in <var>nodes</var>, and null otherwise.

<li><p>Let <var>node</var> be the result of <a>converting nodes into a node</a>, given
<var>nodes</var> and <a>context object</a>'s <a for=Node>node document</a>. Rethrow any exceptions.
<var>nodes</var> and <a>context object</a>'s <a for=Node>node document</a>.

<li><p>If <var>viablePreviousSibling</var> is null, set it to <var>parent</var>'s
<a for=tree>first child</a>, and to <var>viablePreviousSibling</var>'s <a for=tree>next sibling</a>
otherwise.

<li><p><a>Pre-insert</a> <var>node</var> into <var>parent</var> before
<var>viablePreviousSibling</var>. Rethrow any exceptions.
<var>viablePreviousSibling</var>.
</ol>

<p>The <dfn method for=ChildNode><code>after(<var>nodes</var>)</code></dfn> method, when invoked,
Expand All @@ -2630,10 +2630,10 @@ must run these steps:
<a for=tree>sibling</a> not in <var>nodes</var>, and null otherwise.

<li><p>Let <var>node</var> be the result of <a>converting nodes into a node</a>, given
<var>nodes</var> and <a>context object</a>'s <a for=Node>node document</a>. Rethrow any exceptions.
<var>nodes</var> and <a>context object</a>'s <a for=Node>node document</a>.

<li><p><a>Pre-insert</a> <var>node</var> into <var>parent</var> before
<var>viableNextSibling</var>. Rethrow any exceptions.
<var>viableNextSibling</var>.
</ol>

<p>The <dfn method for=ChildNode><code>replaceWith(<var>nodes</var>)</code></dfn> method, when
Expand All @@ -2648,16 +2648,16 @@ invoked, must run these steps:
<a for=tree>sibling</a> not in <var>nodes</var>, and null otherwise.

<li><p>Let <var>node</var> be the result of <a>converting nodes into a node</a>, given
<var>nodes</var> and <a>context object</a>'s <a for=Node>node document</a>. Rethrow any exceptions.
<var>nodes</var> and <a>context object</a>'s <a for=Node>node document</a>.

<li>
<p>If <a>context object</a>'s <a for=tree>parent</a> is <var>parent</var>, <a>replace</a> the
<a>context object</a> with <var>node</var> within <var>parent</var>. Rethrow any exceptions.
<a>context object</a> with <var>node</var> within <var>parent</var>.

<p class=note><a>Context object</a> could have been inserted into <var>node</var>.

<li><p>Otherwise, <a>pre-insert</a> <var>node</var> into <var>parent</var> before
<var>viableNextSibling</var>. Rethrow any exceptions.
<var>viableNextSibling</var>.
</ol>

<p>The <dfn method for=ChildNode><code>remove()</code></dfn> method, when invoked, must run these
Expand Down Expand Up @@ -4830,7 +4830,7 @@ invoked, must run these steps:

<li>Let <var>element</var> be the result of <a>creating an element</a> given the
<a>context object</a>, <var>localName</var>, <var>namespace</var>, null, <var>is</var>, and with
the <var>synchronous custom elements</var> flag set. Rethrow any exceptions.
the <var>synchronous custom elements</var> flag set.

<li>If <var>is</var> is non-null, then <a>set an attribute value</a> for <var>element</var> using
"<code>is</code>" and <var>is</var>.
Expand All @@ -4843,15 +4843,14 @@ invoked, must run these steps:

<ol>
<li>Let <var>namespace</var>, <var>prefix</var>, and <var>localName</var> be the result of passing
<var>namespace</var> and <var>qualifiedName</var> to <a>validate and extract</a>. Rethrow any
exceptions.
<var>namespace</var> and <var>qualifiedName</var> to <a>validate and extract</a>.

<li>Let <var>is</var> be the value of <code>is</code> member of <var>options</var>, or null if no
such member exists.

<li><p>Let <var>element</var> be the result of <a>creating an element</a> given
<var>document</var>, <var>localName</var>, <var>namespace</var>, <var>prefix</var>, <var>is</var>,
and with the <var>synchronous custom elements</var> flag set. Rethrow any exceptions.
and with the <var>synchronous custom elements</var> flag set.

<li>If <var>is</var> is non-null, then <a>set an attribute value</a> for <var>element</var> using
"<code>is</code>" and <var>is</var>.
Expand Down Expand Up @@ -5039,8 +5038,7 @@ method, when invoked, must run these steps:

<ol>
<li><p>Let <var>namespace</var>, <var>prefix</var>, and <var>localName</var> be the result of
passing <var>namespace</var> and <var>qualifiedName</var> to <a>validate and extract</a>. Rethrow
any exceptions.
passing <var>namespace</var> and <var>qualifiedName</var> to <a>validate and extract</a>.

<li><p>Return a new <a>attribute</a> whose <a for=Attr>namespace</a> is <var>namespace</var>,
<a for=Attr>namespace prefix</a> is <var>prefix</var>, <a for=Attr>local name</a> is
Expand Down Expand Up @@ -5219,7 +5217,7 @@ The
method, when invoked, must run these steps:

<ol>
<li><p><a>Validate</a> <var>qualifiedName</var>. Rethrow any exceptions.
<li><p><a>Validate</a> <var>qualifiedName</var>.

<li><p>Return a new <a>doctype</a>, with <var>qualifiedName</var> as its
<a for=DocumentType>name</a>, <var>publicId</var> as its <a>public ID</a>, and <var>systemId</var>
Expand All @@ -5243,7 +5241,6 @@ method, when invoked, must run these steps:
<li><p>If <var>qualifiedName</var> is not the empty string, then set <var>element</var> to the
result of running the <a>internal <code>createElementNS</code> steps</a>, given
<var>document</var>, <var>namespace</var>, <var>qualifiedName</var>, and an empty dictionary.
Rethrow any exceptions.

<li><p>If <var>doctype</var> is non-null, <a>append</a> <var>doctype</var> to <var>document</var>.

Expand Down Expand Up @@ -5669,8 +5666,7 @@ given a <var>document</var>, <var>localName</var>, <var>namespace</var>, and opt
<li><p>Let <var>C</var> be <var>definition</var>'s
<a for="custom element definition">constructor</a>.

<li><p>Set <var>result</var> to <a abstract-op>Construct</a>(<var>C</var>). Rethrow any
exceptions.
<li><p>Set <var>result</var> to <a abstract-op>Construct</a>(<var>C</var>).

<li>
<p>If <var>result</var> does not implement the {{HTMLElement}} interface, then <a>throw</a> a
Expand Down Expand Up @@ -6220,8 +6216,7 @@ method, when invoked, must run these steps:

<ol>
<li><p>Let <var>namespace</var>, <var>prefix</var>, and <var>localName</var> be the result of
passing <var>namespace</var> and <var>qualifiedName</var> to <a>validate and extract</a>. Rethrow
any exceptions.
passing <var>namespace</var> and <var>qualifiedName</var> to <a>validate and extract</a>.

<li><p><a>Set an attribute value</a> for the <a>context object</a> using <var>localName</var>,
<var>value</var>, and also <var>prefix</var> and <var>namespace</var>.
Expand Down Expand Up @@ -6282,7 +6277,7 @@ method, when invoked, must return the result of
<p>The <dfn method for=Element><code>setAttributeNode(<var>attr</var>)</code></dfn> and
<dfn method for=Element><code>setAttributeNodeNS(<var>attr</var>)</code></dfn> methods, when
invoked, must return the result of <a lt="set an attribute">setting an attribute</a> given
<var>attr</var> and the <a>context object</a>. Rethrow any exceptions.
<var>attr</var> and the <a>context object</a>.

<p>The <dfn method for=Element><code>removeAttributeNode(<var>attr</var>)</code></dfn> method,
when invoked, must run these steps:
Expand Down Expand Up @@ -6445,23 +6440,22 @@ for <a>context object</a>.
<p>If <var>element</var>'s <a for=tree>parent</a> is null, return null.

<p>Return the result of <a>pre-inserting</a> <var>node</var> into <var>element</var>'s
<a for=tree>parent</a> before <var>element</var>. Rethrow any exceptions.
<a for=tree>parent</a> before <var>element</var>.

<dt>"<code>afterbegin</code>"
<dd><p>Return the result of <a>pre-inserting</a> <var>node</var> into <var>element</var>
before <var>element</var>'s <a for=tree>first child</a>. Rethrow any exceptions.
<dd><p>Return the result of <a>pre-inserting</a> <var>node</var> into <var>element</var> before
<var>element</var>'s <a for=tree>first child</a>.

<dt>"<code>beforeend</code>"
<dd><p>Return the result of <a>pre-inserting</a> <var>node</var> into <var>element</var>
before null. Rethrow any exceptions.
<dd><p>Return the result of <a>pre-inserting</a> <var>node</var> into <var>element</var> before
null.

<dt>"<code>afterend</code>"
<dd>
<p>If <var>element</var>'s <a for=tree>parent</a> is null, return null.

<p>Return the result of <a>pre-inserting</a> <var>node</var> into <var>element</var>'s
<a for=tree>parent</a> before <var>element</var>'s <a for=tree>next sibling</a>. Rethrow any
exceptions.
<a for=tree>parent</a> before <var>element</var>'s <a for=tree>next sibling</a>.

<dt>Otherwise</dt>
<dd><p><a>Throw</a> a {{SyntaxError}}.
Expand All @@ -6470,7 +6464,7 @@ for <a>context object</a>.
<p>The
<dfn method for=Element><code>insertAdjacentElement(<var>where</var>, <var>element</var>)</code></dfn>
method, when invoked, must return the result of running <a>insert adjacent</a>, given
<a>context object</a>, <var>where</var>, and <var>element</var>. Rethrow any exceptions.
<a>context object</a>, <var>where</var>, and <var>element</var>.

<p>The
<dfn method for=Element><code>insertAdjacentText(<var>where</var>, <var>data</var>)</code></dfn>
Expand All @@ -6482,7 +6476,7 @@ method, when invoked, must run these steps:
<a for=Node>node document</a>.

<li><p>Run <a>insert adjacent</a>, given <a>context object</a>, <var>where</var>, and
<var>text</var>. Rethrow any exceptions.
<var>text</var>.
</ol>

<p class="note">This method returns nothing because it existed before we had a chance to design it.
Expand Down Expand Up @@ -6576,7 +6570,8 @@ method, when invoked, must return the result of

<p>The <dfn method for="NamedNodeMap"><code>setNamedItem(<var>attr</var>)</code></dfn> and
<dfn method for="NamedNodeMap"><code>setNamedItemNS(<var>attr</var>)</code></dfn>
methods, when invoked, must return the result of <a lt="set an attribute">setting an attribute</a> given <var>attr</var> and <a for=NamedNodeMap>element</a>. Rethrow any exceptions.
methods, when invoked, must return the result of <a lt="set an attribute">setting an attribute</a>
given <var>attr</var> and <a for=NamedNodeMap>element</a>.

<p>The <dfn method for="NamedNodeMap"><code>removeNamedItem(<var>qualifiedName</var>)</code></dfn>
method, when invoked, must run these steps:
Expand Down Expand Up @@ -8679,7 +8674,7 @@ these steps:
return {{NodeFilter/FILTER_ACCEPT}}.
<li>Let <var>result</var> be the return value of <a>call a user object's operation</a> with
<a for=traversal>filter</a>, "<code>acceptNode</code>", and a list of arguments consisting of
<var>node</var>. Rethrow any exceptions.
<var>node</var>.
<!-- no need to pass callback this value; it's undefined which becomes the global object -->
<li>Return <var>result</var>.
</ol>
Expand Down Expand Up @@ -9488,7 +9483,7 @@ method, when invoked, must run these steps:

<ol>
<li><p>Let <var>result</var> be the return value of <a>validation steps</a> called with
<var>token</var>. Rethrow any exceptions.
<var>token</var>.

<li><p>Return <var>result</var>.
</ol>
Expand Down

0 comments on commit d298c5b

Please sign in to comment.