|
38 | 38 | <h1>CSS Object Model (CSSOM)</h1> |
39 | 39 |
|
40 | 40 |
|
41 | | - <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 10 June 2013</h2> |
| 41 | + <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 11 June 2013</h2> |
42 | 42 |
|
43 | 43 | <dl> |
44 | 44 |
|
@@ -112,7 +112,7 @@ <h2 class="no-num no-toc" id="sotd">Status of This Document</h2> |
112 | 112 | can be found in the |
113 | 113 | <a href="http://www.w3.org/TR/">W3C technical reports index at http://www.w3.org/TR/.</a></em> |
114 | 114 |
|
115 | | -<p class="dontpublish">This is the 10 June 2013 Editor's Draft of CSSOM. Please send comments to |
| 115 | +<p class="dontpublish">This is the 11 June 2013 Editor's Draft of CSSOM. Please send comments to |
116 | 116 | <a href="mailto:www-style@w3.org?subject=%5Bcssom%5D%20">www-style@w3.org</a> |
117 | 117 | (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) |
118 | 118 | with <samp>[cssom]</samp> at the start of the subject line. |
@@ -271,13 +271,15 @@ <h2 id="terminology"><span class="secno">3 </span>Terminology</h2> |
271 | 271 | <p>This specification employs certain terminology from the following documents: |
272 | 272 | <cite>DOM</cite>, |
273 | 273 | <cite>HTML</cite>, |
| 274 | +<cite>CSS Syntax</cite>, |
274 | 275 | <cite>URL</cite>, |
275 | 276 | <cite>Fetch</cite>, |
276 | 277 | <cite>Associating Style Sheets with XML documents</cite> |
277 | 278 | and |
278 | 279 | <cite>XML</cite>. |
279 | 280 | <a href="#refsDOM">[DOM]</a> |
280 | 281 | <a href="#refsHTML">[HTML]</a> |
| 282 | +<a href="#refsCSSSYNTAX">[CSSSYNTAX]</a> |
281 | 283 | <a href="#refsURL">[URL]</a> |
282 | 284 | <a href="#refsFETCH">[FETCH]</a> |
283 | 285 | <a href="#refsXMLSS">[XMLSS]</a> |
@@ -1750,7 +1752,8 @@ <h3 id="css-rules"><span class="secno">6.4 </span>CSS Rules</h3> |
1750 | 1752 | <p>In addition to the above state, each <a href="#css-rule">CSS rule</a> may be associated |
1751 | 1753 | with other state in accordance with its <a href="#concept-css-rule-type" title="concept-css-rule-type">type</a>.</p> |
1752 | 1754 |
|
1753 | | -<p>To <dfn id="parse-a-css-rule">parse a CSS rule</dfn> ...</p> |
| 1755 | +<p>To <dfn id="parse-a-css-rule">parse a CSS rule</dfn> from a string <var>string</var>, invoke <a class="external" data-anolis-spec="csssyntax" href="http://dev.w3.org/csswg/css-syntax/#parse-a-rule0">parse a rule</a> with <var>string</var> and return |
| 1756 | +the value returned.</p> |
1754 | 1757 |
|
1755 | 1758 | <p>To <dfn id="serialize-a-css-rule">serialize a CSS rule</dfn>, perform one of the following in accordance with the <a href="#css-rule">CSS rule</a>'s |
1756 | 1759 | <a href="#concept-css-rule-type" title="concept-css-rule-type">type</a>:</p> |
@@ -1821,8 +1824,9 @@ <h3 id="css-rules"><span class="secno">6.4 </span>CSS Rules</h3> |
1821 | 1824 | <p>To <dfn id="insert-a-css-rule">insert a CSS rule</dfn> <var>rule</var> in a CSS rule list <var>list</var> at index <var>index</var>, follow these steps:</p> |
1822 | 1825 | <ol> |
1823 | 1826 | <li><p>Set <var>new rule</var> to the results of performing <a href="#parse-a-css-rule">parse a CSS rule</a> |
1824 | | - on argument <var>rule</var>, <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throwing</a> |
1825 | | - a <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#syntaxerror">SyntaxError</a></code> exception if a parse error occurs.</li> |
| 1827 | + on argument <var>rule</var>. |
| 1828 | + <li><p>If <var>new rule</var> is a syntax error, <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throw</a> |
| 1829 | + a <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#syntaxerror">SyntaxError</a></code> exception.</li> |
1826 | 1830 | <li><p>If <var>new rule</var> is an <code title="">@charset</code> at-rule, <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throw</a> a |
1827 | 1831 | <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#syntaxerror">SyntaxError</a></code> exception. |
1828 | 1832 | <li><p>Set <var>length</var> to the number of items in <var>list</var>.</li> |
@@ -1930,14 +1934,13 @@ <h4 id="the-cssrule-interface"><span class="secno">6.4.2 </span>The <code title= |
1930 | 1934 | <a href="#css-rule">CSS rule</a>.</p> |
1931 | 1935 | <p>On setting the <code title="dom-CSSRule-cssText"><a href="#dom-cssrule-csstext">cssText</a></code> attribute these steps must be run:</p> |
1932 | 1936 | <ol> |
1933 | | - <li><p><a href="#parse-a-css-rule" title="Parse a CSS rule">Parse</a> the value.</li> |
1934 | | - <li><p>If parsing failed terminate this algorithm.</li> |
1935 | | - <li><p>If the <code title="dom-CSSRule-type"><a href="#dom-cssrule-type">type</a></code> of the new |
1936 | | - object does not match the <code title="dom-CSSRule-type"><a href="#dom-cssrule-type">type</a></code> of |
| 1937 | + <li><p>Let <var>new rule</var> be the returned value of <a href="#parse-a-css-rule" title="parse a CSS rule">parsing</a> the value.</li> |
| 1938 | + <li><p>If <var>new rule</var> is a syntax error, terminate this algorithm.</li> |
| 1939 | + <li><p>If the <a href="#concept-css-rule-type" title="concept-css-rule-type">type</a> of <var>new rule</var> does not match the <a href="#concept-css-rule-type" title="concept-css-rule-type">type</a> of |
1937 | 1940 | the current object |
1938 | 1941 | <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throw</a> an |
1939 | 1942 | <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#invalidmodificationerror">InvalidModificationError</a></code> exception.</li> |
1940 | | - <li><p>Replace the current object with the new object.</li> |
| 1943 | + <li><p>Replace the current object with <var>new rule</var>.</li> |
1941 | 1944 | </ol> |
1942 | 1945 |
|
1943 | 1946 | <p>The <dfn id="dom-cssrule-parentrule" title="dom-CSSRule-parentRule"><code>parentRule</code></dfn> attribute must return the nearest enclosing rule of the current rule or null if |
@@ -2962,6 +2965,9 @@ <h2 class="no-num" id="references">References</h2> |
2962 | 2965 | <dt id="refsCSSPAGE">[CSSPAGE] |
2963 | 2966 | <dd><cite><a href="http://dev.w3.org/csswg/css-page/">CSS Paged Media Module</a></cite>, Melinda Grant, Håkon Wium Lie, Elika J. Etemad et al.. W3C. |
2964 | 2967 |
|
| 2968 | +<dt id="refsCSSSYNTAX">[CSSSYNTAX] |
| 2969 | +<dd><cite><a href="http://dev.w3.org/csswg/css-syntax/">CSS Syntax Module Level 3</a></cite>, Tab Atkins Jr. W3C. |
| 2970 | + |
2965 | 2971 | <dt id="refsDOM">[DOM] |
2966 | 2972 | <dd><cite><a href="http://dom.spec.whatwg.org/">DOM</a></cite>, Anne van Kesteren, Aryeh Gregor and Ms2ger. WHATWG. |
2967 | 2973 |
|
|
0 commit comments