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 <dfnid="dom-cssrule-type" title="dom-CSSRule-type"><code>type</code></dfn> attribute must return the CSS rule type, as follows:
1800
1800
1801
-
<p>When the value of the <code>type</code> attribute is <dfnid="dom-cssrule-style_rule" title="dom-CSSRule-STYLE_RULE"><code>STYLE_RULE</code></dfn>, then the object that implements
1802
-
this interface must implement the <code><ahref="#cssstylerule">CSSStyleRule</a></code> interface.</p>
1803
-
1804
-
<p>When the value of the <code>type</code> attribute is <dfnid="dom-cssrule-charset_rule" title="dom-CSSRule-CHARSET_RULE"><code>CHARSET_RULE</code></dfn>, then the object that implements
1805
-
this interface must implement the <code><ahref="#csscharsetrule">CSSCharsetRule</a></code> interface.</p>
1806
-
1807
-
<p>When the value of the <code>type</code> attribute is <dfnid="dom-cssrule-import_rule" title="dom-CSSRule-IMPORT_RULE"><code>IMPORT_RULE</code></dfn>, then the object that implements
1808
-
this interface must implement the <code><ahref="#cssimportrule">CSSImportRule</a></code> interface.</p>
1809
-
1810
-
<p>When the value of the <code>type</code> attribute is <dfnid="dom-cssrule-media_rule" title="dom-CSSRule-MEDIA_RULE"><code>MEDIA_RULE</code></dfn>, then the object that implements
1811
-
this interface must implement the <code><ahref="#cssmediarule">CSSMediaRule</a></code> interface.</p>
1812
-
1813
-
<p>When the value of the <code>type</code> attribute is <dfnid="dom-cssrule-font_face_rule" title="dom-CSSRule-FONT_FACE_RULE"><code>FONT_FACE_RULE</code></dfn>, then the object that implements
1814
-
this interface must implement the <code><ahref="#cssfontfacerule">CSSFontFaceRule</a></code> interface.</p>
1815
-
1816
-
<p>When the value of the <code>type</code> attribute is <dfnid="dom-cssrule-page_rule" title="dom-CSSRule-PAGE_RULE"><code>PAGE_RULE</code></dfn>, then the object that implements
1817
-
this interface must implement the <code><ahref="#csspagerule">CSSPageRule</a></code> interface.</p>
1818
-
1819
-
<p>When the value of the <code>type</code> attribute is <dfnid="dom-cssrule-namespace_rule" title="dom-CSSRule-NAMESPACE_RULE"><code>NAMESPACE_RULE</code></dfn>, then the object that implements
1820
-
this interface must implement the <code><ahref="#cssnamespacerule">CSSNamespaceRule</a></code> interface.</p>
1801
+
<dlclass="switch">
1802
+
<dt>If the object is a <code><ahref="#cssstylerule">CSSStyleRule</a></code>
1803
+
<dd><p>Return <dfnid="dom-cssrule-style_rule" title="dom-CSSRule-STYLE_RULE"><code>STYLE_RULE</code></dfn> (numeric value 1).
1804
+
<dt>If the object is a <code><ahref="#csscharsetrule">CSSCharsetRule</a></code>
1805
+
<dd><p>Return <dfnid="dom-cssrule-charset_rule" title="dom-CSSRule-CHARSET_RULE"><code>CHARSET_RULE</code></dfn> (numberic value 2).
1806
+
<dt>If the object is a <code><ahref="#cssimportrule">CSSImportRule</a></code>
1807
+
<dd><p>Return <dfnid="dom-cssrule-import_rule" title="dom-CSSRule-IMPORT_RULE"><code>IMPORT_RULE</code></dfn> (numberic value 3).
1808
+
<dt>If the object is a <code><ahref="#cssmediarule">CSSMediaRule</a></code>
1809
+
<dd><p>Return <dfnid="dom-cssrule-media_rule" title="dom-CSSRule-MEDIA_RULE"><code>MEDIA_RULE</code></dfn> (numeric value 4).
1810
+
<dt>If the object is a <code><ahref="#cssfontfacerule">CSSFontFaceRule</a></code>
1811
+
<dd><p>Return <dfnid="dom-cssrule-font_face_rule" title="dom-CSSRule-FONT_FACE_RULE"><code>FONT_FACE_RULE</code></dfn> (numeric value 5).
1812
+
<dt>If the object is a <code><ahref="#csspagerule">CSSPageRule</a></code>
1813
+
<dd><p>Return <dfnid="dom-cssrule-page_rule" title="dom-CSSRule-PAGE_RULE"><code>PAGE_RULE</code></dfn> (numeric value 6).
1814
+
<dt>If the object is a <code><ahref="#cssnamespacerule">CSSNamespaceRule</a></code>
1815
+
<dd><p>Return <dfnid="dom-cssrule-namespace_rule" title="dom-CSSRule-NAMESPACE_RULE"><code>NAMESPACE_RULE</code></dfn> (numeric value 10).
1816
+
<dt>Otherwise
1817
+
<dd><p>Return a value defined on the <ahref="http://wiki.csswg.org/spec/cssom-constants">CSSOM Constants</a> wiki page.
1818
+
</dl>
1821
1819
1822
-
<p>The <dfnid="dom-cssrule-type" title="dom-CSSRule-type"><code>type</code></dfn> attribute must return one of the following values:
<p>The value 0, formerly known as <code>UNKNOWN_RULE</code>, is made
1832
-
obsolete by this specification. This value will not be re-allocated in the future and shall remain reserved.</p>
1833
-
<pclass="note">Constants for new and proprietary rule types are coordinated
1834
-
on the <ahref="http://wiki.csswg.org/spec/cssom-constants">CSSOM Constants</a> wiki page.</p>
1820
+
<pclass="note">The value 0, formerly known as <codetitle="">UNKNOWN_RULE</code>, is made
1821
+
obsolete by this specification. This value will not be re-allocated in the future and will remain reserved.</p>
1835
1822
1836
1823
<p>The <dfnid="dom-cssrule-csstext" title="dom-CSSRule-cssText"><code>cssText</code></dfn> attribute must return a <ahref="#serialize-a-css-rule" title="serialize a CSS rule">serialization</a> of the
<p>The <dfnid="dom-cssstyledeclaration-length" title="dom-CSSStyleDeclaration-length"><code>length</code></dfn> attribute must return the number of declarations in the <ahref="#css-declaration-block-declarations">CSS declaration block declarations</a>.</p>
2108
2095
2109
-
<p>The <dfnid="dom-cssstyledeclaration-item" title="dom-CSSStyleDeclaration-item"><code>item(<var>index</var>)</code></dfn> method must return the name of the property at position <var>index</var>.</p>"
2096
+
<p>The <dfnid="dom-cssstyledeclaration-item" title="dom-CSSStyleDeclaration-item"><code>item(<var>index</var>)</code></dfn> method must return the name of the property at position <var>index</var>.</p>
2110
2097
2111
2098
<p>The <dfnid="dom-cssstyledeclaration-getpropertyvalue" title="dom-CSSStyleDeclaration-getPropertyValue"><code>getPropertyValue(<var>property</var>)</code></dfn> method must run these steps:</p>
<p>When the value of the <code>type</code> attribute is <dfntitle=dom-CSSRule-STYLE_RULE><code>STYLE_RULE</code></dfn>, then the object that implements
1732
-
this interface must implement the <code>CSSStyleRule</code> interface.</p>
1733
-
1734
-
<p>When the value of the <code>type</code> attribute is <dfntitle=dom-CSSRule-CHARSET_RULE><code>CHARSET_RULE</code></dfn>, then the object that implements
1735
-
this interface must implement the <code>CSSCharsetRule</code> interface.</p>
1736
-
1737
-
<p>When the value of the <code>type</code> attribute is <dfntitle=dom-CSSRule-IMPORT_RULE><code>IMPORT_RULE</code></dfn>, then the object that implements
1738
-
this interface must implement the <code>CSSImportRule</code> interface.</p>
1739
-
1740
-
<p>When the value of the <code>type</code> attribute is <dfntitle=dom-CSSRule-MEDIA_RULE><code>MEDIA_RULE</code></dfn>, then the object that implements
1741
-
this interface must implement the <code>CSSMediaRule</code> interface.</p>
1742
-
1743
-
<p>When the value of the <code>type</code> attribute is <dfntitle=dom-CSSRule-FONT_FACE_RULE><code>FONT_FACE_RULE</code></dfn>, then the object that implements
1744
-
this interface must implement the <code>CSSFontFaceRule</code> interface.</p>
1745
-
1746
-
<p>When the value of the <code>type</code> attribute is <dfntitle=dom-CSSRule-PAGE_RULE><code>PAGE_RULE</code></dfn>, then the object that implements
1747
-
this interface must implement the <code>CSSPageRule</code> interface.</p>
1748
-
1749
-
<p>When the value of the <code>type</code> attribute is <dfntitle=dom-CSSRule-NAMESPACE_RULE><code>NAMESPACE_RULE</code></dfn>, then the object that implements
1750
-
this interface must implement the <code>CSSNamespaceRule</code> interface.</p>
1729
+
<p>The <dfntitle=dom-CSSRule-type><code>type</code></dfn> attribute must return the CSS rule type, as follows:
1730
+
1731
+
<dlclass=switch>
1732
+
<dt>If the object is a <code>CSSStyleRule</code>
1733
+
<dd><p>Return <dfntitle=dom-CSSRule-STYLE_RULE><code>STYLE_RULE</code></dfn> (numeric value 1).
1734
+
<dt>If the object is a <code>CSSCharsetRule</code>
1735
+
<dd><p>Return <dfntitle=dom-CSSRule-CHARSET_RULE><code>CHARSET_RULE</code></dfn> (numberic value 2).
1736
+
<dt>If the object is a <code>CSSImportRule</code>
1737
+
<dd><p>Return <dfntitle=dom-CSSRule-IMPORT_RULE><code>IMPORT_RULE</code></dfn> (numberic value 3).
1738
+
<dt>If the object is a <code>CSSMediaRule</code>
1739
+
<dd><p>Return <dfntitle=dom-CSSRule-MEDIA_RULE><code>MEDIA_RULE</code></dfn> (numeric value 4).
1740
+
<dt>If the object is a <code>CSSFontFaceRule</code>
1741
+
<dd><p>Return <dfntitle=dom-CSSRule-FONT_FACE_RULE><code>FONT_FACE_RULE</code></dfn> (numeric value 5).
1742
+
<dt>If the object is a <code>CSSPageRule</code>
1743
+
<dd><p>Return <dfntitle=dom-CSSRule-PAGE_RULE><code>PAGE_RULE</code></dfn> (numeric value 6).
1744
+
<dt>If the object is a <code>CSSNamespaceRule</code>
1745
+
<dd><p>Return <dfntitle=dom-CSSRule-NAMESPACE_RULE><code>NAMESPACE_RULE</code></dfn> (numeric value 10).
1746
+
<dt>Otherwise
1747
+
<dd><p>Return a value defined on the <ahref='http://wiki.csswg.org/spec/cssom-constants'>CSSOM Constants</a> wiki page.
1748
+
</dl>
1751
1749
1752
-
<p>The <dfntitle=dom-CSSRule-type><code>type</code></dfn> attribute must return one of the following values:
<p>The <dfntitle=dom-CSSStyleDeclaration-length><code>length</code></dfn> attribute must return the number of declarations in the <span>CSS declaration block declarations</span>.</p>
2038
2025
2039
-
<p>The <dfntitle=dom-CSSStyleDeclaration-item><code>item(<var>index</var>)</code></dfn> method must return the name of the property at position <var>index</var>.</p>"
2026
+
<p>The <dfntitle=dom-CSSStyleDeclaration-item><code>item(<var>index</var>)</code></dfn> method must return the name of the property at position <var>index</var>.</p>
2040
2027
2041
2028
<p>The <dfntitle=dom-CSSStyleDeclaration-getPropertyValue><code>getPropertyValue(<var>property</var>)</code></dfn> method must run these steps:</p>
0 commit comments