Skip to content

Commit a629c75

Browse files
committed
update exceptions for DOM4
1 parent 7ace934 commit a629c75

3 files changed

Lines changed: 75 additions & 54 deletions

File tree

cssom/Overview.html

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,8 +1712,10 @@ <h3 id="css-rules"><span class="secno">6.4 </span>CSS Rules</h3>
17121712

17131713
<ol>
17141714
<li><p>If <var title="">index</var> is negative or greater than the
1715-
length of the <var title="">list</var> raise an
1716-
<code>INDEX_SIZE_ERR</code> exception and terminate these steps.</li>
1715+
length of the <var title="">list</var>,
1716+
<a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> an
1717+
"<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#indexsizeerror">IndexSizeError</a></code>" exception and
1718+
terminate these steps.
17171719

17181720
<li><p><a href="#parse-a-css-rule" title="Parse a CSS rule">Parse</a>
17191721
<var title="">rule</var>.</li>
@@ -1722,9 +1724,10 @@ <h3 id="css-rules"><span class="secno">6.4 </span>CSS Rules</h3>
17221724

17231725
<li><p>If the new object can not be inserted within the
17241726
<var title="">list</var> at the given <var title="">index</var> due to
1725-
limitations of the CSS specification raise a
1726-
<code>HIERARCHY_REQUEST_ERR</code> exception and terminate these
1727-
steps.</li>
1727+
limitations of the CSS specification,
1728+
<a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> an
1729+
"<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#hierarchyrequesterror">HierarchyRequestError</a></code>" exception and
1730+
terminate these steps.
17281731

17291732
<li><p>Insert the new object at the given <var title="">index</var>
17301733
within the <var title="">list</var>.</li>
@@ -1736,8 +1739,9 @@ <h3 id="css-rules"><span class="secno">6.4 </span>CSS Rules</h3>
17361739

17371740
<ol>
17381741
<li><p>If <var title="">index</var> is negative or greater than the
1739-
length of the <var title="">list</var> raise an
1740-
<code>INDEX_SIZE_ERR</code> exception and terminate these steps.</li>
1742+
length of the <var title="">list</var>
1743+
<a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> an
1744+
"<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#indexsizeerror">IndexSizeError</a></code>" exception and terminate these steps.</li>
17411745

17421746
<li><p>Remove the object at <var title="">index</var> from
17431747
<var title="">list</var>.</li>
@@ -1819,8 +1823,9 @@ <h4 id="the-cssrule-interface"><span class="secno">6.4.2 </span>The <code title=
18191823

18201824
<li><p>If the <code title="dom-CSSRule-type"><a href="#dom-cssrule-type">type</a></code> of the new
18211825
object does not match the <code title="dom-CSSRule-type"><a href="#dom-cssrule-type">type</a></code> of
1822-
the current object raise an <code>INVALID_MODIFICATION_ERR</code>
1823-
exception.</li>
1826+
the current object
1827+
<a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> an
1828+
"<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#invalidmodificationerror">InvalidModificationError</a></code>" exception.
18241829

18251830
<li><p>Replace the current object with the new object.</li>
18261831
</ol>
@@ -2232,11 +2237,11 @@ <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The
22322237

22332238
<ol>
22342239
<li><p>If the <a href="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> is set,
2235-
raise a <code>NO_MODIFICATION_ALLOWED_ERR</code> and terminate this
2236-
algorithm.</li>
2240+
<a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> a
2241+
"<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror">NoModificationAllowedError</a></code>" exception
2242+
and terminate these steps.
22372243

2238-
<li><p>Empty the
2239-
<a href="#css-declaration-block-declarations">CSS declaration block declarations</a>.</li>
2244+
<li><p>Empty the <a href="#css-declaration-block-declarations">CSS declaration block declarations</a>.
22402245

22412246
<li><p><a href="#parse-a-css-declaration-block" title="Parse a CSS declaration block">Parse</a> the given
22422247
value and, if the return value is not null, insert it into the
@@ -2280,8 +2285,9 @@ <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The
22802285

22812286
<ol>
22822287
<li><p>If the <a href="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> is set,
2283-
raise a <code>NO_MODIFICATION_ALLOWED_ERR</code> and terminate this
2284-
algorithm.</li>
2288+
<a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> an
2289+
"<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror">NoModificationAllowedError</a></code>" and
2290+
terminate these steps.
22852291

22862292
<li><p>If <var title="">property</var> is not an
22872293
<a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for a
@@ -2319,8 +2325,9 @@ <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The
23192325

23202326
<ol>
23212327
<li><p>If the <a href="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> is set,
2322-
raise a <code>NO_MODIFICATION_ALLOWED_ERR</code> and terminate this
2323-
algorithm.</li>
2328+
<a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> a
2329+
"<code class="external"><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror">NoModificationAllowedError</a></code>" and
2330+
terminate these steps.
23242331

23252332
<li><p>If <var title="">property</var> is an
23262333
<a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for a
@@ -2354,7 +2361,7 @@ <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The
23542361
<code title="dom-CSSStyleDeclaration-setProperty"><a href="#dom-cssstyledeclaration-setproperty">setProperty()</a></code>
23552362
with as first argument the CSS property given in the second column on the
23562363
same row, as second argument the given value, and no third argument. Any
2357-
exceptions raised must be re-raised.</p>
2364+
exceptions thrown must be re-thrown.</p>
23582365

23592366
<table>
23602367
<thead>

cssom/Overview.src.html

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,8 +1631,10 @@ <h3>CSS Rules</h3>
16311631

16321632
<ol>
16331633
<li><p>If <var title>index</var> is negative or greater than the
1634-
length of the <var title>list</var> raise an
1635-
<code>INDEX_SIZE_ERR</code> exception and terminate these steps.</p></li>
1634+
length of the <var title>list</var>,
1635+
<span data-anolis-spec=dom title=concept-throw>throw</span> an
1636+
"<code data-anolis-spec=dom>IndexSizeError</code>" exception and
1637+
terminate these steps.
16361638

16371639
<li><p><span title="Parse a CSS rule">Parse</span>
16381640
<var title>rule</var>.</p></li>
@@ -1641,9 +1643,10 @@ <h3>CSS Rules</h3>
16411643

16421644
<li><p>If the new object can not be inserted within the
16431645
<var title>list</var> at the given <var title>index</var> due to
1644-
limitations of the CSS specification raise a
1645-
<code>HIERARCHY_REQUEST_ERR</code> exception and terminate these
1646-
steps.</p></li>
1646+
limitations of the CSS specification,
1647+
<span data-anolis-spec=dom title=concept-throw>throw</span> an
1648+
"<code data-anolis-spec=dom>HierarchyRequestError</code>" exception and
1649+
terminate these steps.
16471650

16481651
<li><p>Insert the new object at the given <var title>index</var>
16491652
within the <var title>list</var>.</p></li>
@@ -1655,8 +1658,9 @@ <h3>CSS Rules</h3>
16551658

16561659
<ol>
16571660
<li><p>If <var title>index</var> is negative or greater than the
1658-
length of the <var title>list</var> raise an
1659-
<code>INDEX_SIZE_ERR</code> exception and terminate these steps.</p></li>
1661+
length of the <var title>list</var>
1662+
<span data-anolis-spec=dom title=concept-throw>throw</span> an
1663+
"<code data-anolis-spec=dom>IndexSizeError</code>" exception and terminate these steps.</p></li>
16601664

16611665
<li><p>Remove the object at <var title>index</var> from
16621666
<var title>list</var>.</p></li>
@@ -1738,8 +1742,9 @@ <h4>The <code title>CSSRule</code> Interface</h4>
17381742

17391743
<li><p>If the <code title="dom-CSSRule-type">type</code> of the new
17401744
object does not match the <code title="dom-CSSRule-type">type</code> of
1741-
the current object raise an <code>INVALID_MODIFICATION_ERR</code>
1742-
exception.</p></li>
1745+
the current object
1746+
<span data-anolis-spec=dom title=concept-throw>throw</span> an
1747+
"<code data-anolis-spec=dom>InvalidModificationError</code>" exception.
17431748

17441749
<li><p>Replace the current object with the new object.</p></li>
17451750
</ol>
@@ -2151,11 +2156,11 @@ <h4>The <code title>CSSStyleDeclaration</code> Interface</h4>
21512156

21522157
<ol>
21532158
<li><p>If the <span>CSS declaration block readonly flag</span> is set,
2154-
raise a <code>NO_MODIFICATION_ALLOWED_ERR</code> and terminate this
2155-
algorithm.</p></li>
2159+
<span data-anolis-spec=dom title=concept-throw>throw</span> a
2160+
"<code data-anolis-spec=dom>NoModificationAllowedError</code>" exception
2161+
and terminate these steps.
21562162

2157-
<li><p>Empty the
2158-
<span>CSS declaration block declarations</span>.</p></li>
2163+
<li><p>Empty the <span>CSS declaration block declarations</span>.
21592164

21602165
<li><p><span title="Parse a CSS declaration block">Parse</span> the given
21612166
value and, if the return value is not null, insert it into the
@@ -2199,8 +2204,9 @@ <h4>The <code title>CSSStyleDeclaration</code> Interface</h4>
21992204

22002205
<ol>
22012206
<li><p>If the <span>CSS declaration block readonly flag</span> is set,
2202-
raise a <code>NO_MODIFICATION_ALLOWED_ERR</code> and terminate this
2203-
algorithm.</p></li>
2207+
<span data-anolis-spec=dom title=concept-throw>throw</span> an
2208+
"<code data-anolis-spec=dom>NoModificationAllowedError</code>" and
2209+
terminate these steps.
22042210

22052211
<li><p>If <var title>property</var> is not an
22062212
<span data-anolis-spec=dom>ASCII case-insensitive</span> match for a
@@ -2238,8 +2244,9 @@ <h4>The <code title>CSSStyleDeclaration</code> Interface</h4>
22382244

22392245
<ol>
22402246
<li><p>If the <span>CSS declaration block readonly flag</span> is set,
2241-
raise a <code>NO_MODIFICATION_ALLOWED_ERR</code> and terminate this
2242-
algorithm.</p></li>
2247+
<span data-anolis-spec=dom title=concept-throw>throw</span> a
2248+
"<code data-anolis-spec=dom>NoModificationAllowedError</code>" and
2249+
terminate these steps.
22432250

22442251
<li><p>If <var title>property</var> is an
22452252
<span data-anolis-spec=dom>ASCII case-insensitive</span> match for a
@@ -2273,7 +2280,7 @@ <h4>The <code title>CSSStyleDeclaration</code> Interface</h4>
22732280
<code title="dom-CSSStyleDeclaration-setProperty">setProperty()</code>
22742281
with as first argument the CSS property given in the second column on the
22752282
same row, as second argument the given value, and no third argument. Any
2276-
exceptions raised must be re-raised.</p>
2283+
exceptions thrown must be re-thrown.</p>
22772284

22782285
<table>
22792286
<thead>

cssom/cssom-source

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,8 +1631,10 @@ and
16311631

16321632
<ol>
16331633
<li><p>If <var title>index</var> is negative or greater than the
1634-
length of the <var title>list</var> raise an
1635-
<code>INDEX_SIZE_ERR</code> exception and terminate these steps.</p></li>
1634+
length of the <var title>list</var>,
1635+
<span data-anolis-spec=dom title=concept-throw>throw</span> an
1636+
"<code data-anolis-spec=dom>IndexSizeError</code>" exception and
1637+
terminate these steps.
16361638

16371639
<li><p><span title="Parse a CSS rule">Parse</span>
16381640
<var title>rule</var>.</p></li>
@@ -1641,9 +1643,10 @@ and
16411643

16421644
<li><p>If the new object can not be inserted within the
16431645
<var title>list</var> at the given <var title>index</var> due to
1644-
limitations of the CSS specification raise a
1645-
<code>HIERARCHY_REQUEST_ERR</code> exception and terminate these
1646-
steps.</p></li>
1646+
limitations of the CSS specification,
1647+
<span data-anolis-spec=dom title=concept-throw>throw</span> an
1648+
"<code data-anolis-spec=dom>HierarchyRequestError</code>" exception and
1649+
terminate these steps.
16471650

16481651
<li><p>Insert the new object at the given <var title>index</var>
16491652
within the <var title>list</var>.</p></li>
@@ -1655,8 +1658,9 @@ and
16551658

16561659
<ol>
16571660
<li><p>If <var title>index</var> is negative or greater than the
1658-
length of the <var title>list</var> raise an
1659-
<code>INDEX_SIZE_ERR</code> exception and terminate these steps.</p></li>
1661+
length of the <var title>list</var>
1662+
<span data-anolis-spec=dom title=concept-throw>throw</span> an
1663+
"<code data-anolis-spec=dom>IndexSizeError</code>" exception and terminate these steps.</p></li>
16601664

16611665
<li><p>Remove the object at <var title>index</var> from
16621666
<var title>list</var>.</p></li>
@@ -1738,8 +1742,9 @@ and
17381742

17391743
<li><p>If the <code title="dom-CSSRule-type">type</code> of the new
17401744
object does not match the <code title="dom-CSSRule-type">type</code> of
1741-
the current object raise an <code>INVALID_MODIFICATION_ERR</code>
1742-
exception.</p></li>
1745+
the current object
1746+
<span data-anolis-spec=dom title=concept-throw>throw</span> an
1747+
"<code data-anolis-spec=dom>InvalidModificationError</code>" exception.
17431748

17441749
<li><p>Replace the current object with the new object.</p></li>
17451750
</ol>
@@ -2030,11 +2035,11 @@ and
20302035

20312036
<ol>
20322037
<li><p>If the <span>CSS declaration block readonly flag</span> is set,
2033-
raise a <code>NO_MODIFICATION_ALLOWED_ERR</code> and terminate this
2034-
algorithm.</p></li>
2038+
<span data-anolis-spec=dom title=concept-throw>throw</span> a
2039+
"<code data-anolis-spec=dom>NoModificationAllowedError</code>" exception
2040+
and terminate these steps.
20352041

2036-
<li><p>Empty the
2037-
<span>CSS declaration block declarations</span>.</p></li>
2042+
<li><p>Empty the <span>CSS declaration block declarations</span>.
20382043

20392044
<li><p><span title="Parse a CSS declaration block">Parse</span> the given
20402045
value and, if the return value is not null, insert it into the
@@ -2078,8 +2083,9 @@ and
20782083

20792084
<ol>
20802085
<li><p>If the <span>CSS declaration block readonly flag</span> is set,
2081-
raise a <code>NO_MODIFICATION_ALLOWED_ERR</code> and terminate this
2082-
algorithm.</p></li>
2086+
<span data-anolis-spec=dom title=concept-throw>throw</span> an
2087+
"<code data-anolis-spec=dom>NoModificationAllowedError</code>" and
2088+
terminate these steps.
20832089

20842090
<li><p>If <var title>property</var> is not an
20852091
<span data-anolis-spec=dom>ASCII case-insensitive</span> match for a
@@ -2117,8 +2123,9 @@ and
21172123

21182124
<ol>
21192125
<li><p>If the <span>CSS declaration block readonly flag</span> is set,
2120-
raise a <code>NO_MODIFICATION_ALLOWED_ERR</code> and terminate this
2121-
algorithm.</p></li>
2126+
<span data-anolis-spec=dom title=concept-throw>throw</span> a
2127+
"<code data-anolis-spec=dom>NoModificationAllowedError</code>" and
2128+
terminate these steps.
21222129

21232130
<li><p>If <var title>property</var> is an
21242131
<span data-anolis-spec=dom>ASCII case-insensitive</span> match for a
@@ -2152,7 +2159,7 @@ and
21522159
<code title="dom-CSSStyleDeclaration-setProperty">setProperty()</code>
21532160
with as first argument the CSS property given in the second column on the
21542161
same row, as second argument the given value, and no third argument. Any
2155-
exceptions raised must be re-raised.</p>
2162+
exceptions thrown must be re-thrown.</p>
21562163

21572164
<table>
21582165
<thead>

0 commit comments

Comments
 (0)