You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>The <code>CSSStyleDeclaration</code> interface represents a <ahref="#css-declaration-block">CSS declaration block</a>, including its underlying state, where this underlying state depends upon the source of the <code>CSSStyleDeclaration</code> instance.</p>
<code>cssText</code> of type <spanclass="idlAttrType"><a>DOMString</a></span></dt>
1839
+
<dd>
1840
+
<p>The <code>cssText</code> attribute must return the result of <ahref="#serialize-a-css-declaration-block" title="serialize a CSS declaration block">serializing</a> the <ahref="#css-declaration-block-declarations">CSS declaration block declarations</a>.</p><p>Setting the <code>cssText</code> attribute must run these steps: <ol><li><p>If the <ahref="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> is set, <aclass="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> a <codeclass="external"><ahref="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror">NoModificationAllowedError</a></code> exception and terminate these steps.</li><li><p>Empty the <ahref="#css-declaration-block-declarations">CSS declaration block declarations</a>.</li><li><p><ahref="#parse-a-css-declaration-block" title="Parse a CSS declaration block">Parse</a> the given value and, if the return value is not null, insert it into the <ahref="#css-declaration-block-declarations">CSS declaration block declarations</a>.</li></ol></dd>
1839
1841
<dtclass="attribute">
1840
1842
<code>length</code> of type <spanclass="idlAttrType"><a>unsigned long</a></span>, readonly</dt>
1843
+
<dd>
1844
+
<p>The <code>length</code> attribute must return the number of declarations in the <span>collection of CSS declarations</span>.</dd>
1841
1845
<dtclass="attribute">
1842
1846
<code>parentRule</code> of type <spanclass="idlAttrType"><a>CSSRule</a></span>, readonly</dt>
1847
+
<dd>
1848
+
<p>The <code>parentRule</code> attribute must return the <code>CSSrule</code> object the <code>CSSStyleDeclaration</code> is object is associated with or null if it is not associated with a <code>CSSrule</code> object.</dd>
<p>The <code>getPropertyPriority</code> operation, when invoked, if <var>property</var> is an <aclass="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for a property that has a priority user agents must return the canonical priority of that property as given in the syntax definition. Otherwise, the empty string must be returned.</p><pclass="example">E.g. for <code>background-color:lime !IMPORTANT</code> the return value would be '<code>important</code>'.</dd>
<p>The <code>setProperty</code> operation must run these steps:</p><ol><li><p>If the <ahref="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> is set, <aclass="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> an '<codeclass="external"><ahref="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror">NoModificationAllowedError</a></code>' and terminate these steps.</li><li><p>If <var>property</var> is not an <aclass="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for a supported property, terminate this algorithm.</li><li><p>If <var>value</var> is the empty string, invoke <codetitle="dom-CSSStyleDeclaration-removeProperty">removeProperty()</code> with <var>property</var> as argument and terminate this algorithm.</li><li><p>If the <var>priority</var> argument has been omitted let <var>priority</var> be the empty string.</li><li><p>If <var>priority</var> is neither a valid priority nor the empty string terminate this algorithm.</li><li><p>If <ahref="#parse-a-css-value" title="parse a CSS value">parsing the <var>value</var></a> returns null terminate this algorithm. <pclass="note"><var>value</var> can not include '<code>!important</code>'.</p></li><li><p>Finally, set <var>property</var> to <var>value</var> with priority <var>priority</var> when <var>priority</var> is not the empty string. Otherwise set <var>property</var> to <var>value</var>.</li></ol></dd>
<p>The <code>removeProperty</code> operation must run these steps:</p><ol><li><p>If the <ahref="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> is set, <aclass="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> a '<codeclass="external"><ahref="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror">NoModificationAllowedError</a></code>' and terminate these steps.</li><li><p>If <var>property</var> is an <aclass="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for a property of a declaration in the <span>collection of CSS declarations</span> remove the declaration.</li></ol></dd>
<li><p>If the <ahref="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> is set,
1934
-
<aclass="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> an
1935
-
"<codeclass="external"><ahref="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror">NoModificationAllowedError</a></code>" and
1936
-
terminate these steps.</li>
1937
-
1938
-
<li><p>If <var>property</var> is not an
1939
-
<aclass="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for a
1940
-
supported property, terminate this algorithm.</li>
1941
-
1942
-
<li><p>If <var>value</var> is the empty string, invoke
<li><p>If the <ahref="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> is set,
1974
-
<aclass="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw" title="concept-throw">throw</a> a
1975
-
"<codeclass="external"><ahref="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror">NoModificationAllowedError</a></code>" and
1976
-
terminate these steps.</li>
1977
-
1978
-
<li><p>If <var>property</var> is an
1979
-
<aclass="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive">ASCII case-insensitive</a> match for a
1980
-
property of a declaration in the
1981
-
<span>collection of CSS declarations</span> remove the declaration.</li>
0 commit comments