Fri, 31 Aug 2012 13:30:08 -0700
[css3-conditional] Add CSS.supports().
css3-conditional/Overview.html | file | annotate | diff | comparison | revisions | |
css3-conditional/Overview.src.html | file | annotate | diff | comparison | revisions |
1.1 --- a/css3-conditional/Overview.html Fri Aug 31 12:33:26 2012 -0700 1.2 +++ b/css3-conditional/Overview.html Fri Aug 31 13:30:08 2012 -0700 1.3 @@ -225,7 +225,8 @@ 1.4 <li><a href="#the-cssdocumentrule-interface"><span class=secno>8.5. 1.5 </span> The <code>CSSDocumentRule</code> interface</a> 1.6 1.7 - <li><a href="#window-api"><span class=secno>8.6. </span>supportsCSS() 1.8 + <li><a href="#the-css-interface"><span class=secno>8.6. </span> The 1.9 + <code>CSS</code> interface, and the <code title="">supports()</code> 1.10 function</a> 1.11 </ul> 1.12 1.13 @@ -1077,8 +1078,8 @@ 1.14 href="#cssconditionrule"><code>CSSConditionRule</code></a> interface</h3> 1.15 1.16 <p>The <dfn id=cssconditionrule><code>CSSConditionRule</code></dfn> 1.17 - interface represents all the "conditional" rules, which consist of a 1.18 - condition and other rules nested inside of it. 1.19 + interface represents all the "conditional" at-rules, which consist of a 1.20 + condition and a statement block. 1.21 1.22 <pre class=idl>interface CSSConditionRule : CSSRule { 1.23 attribute DOMString conditionText; 1.24 @@ -1184,16 +1185,36 @@ 1.25 <pre class=idl>interface CSSDocumentRule : CSSRule { 1.26 }</pre> 1.27 1.28 - <h3 id=window-api><span class=secno>8.6. </span>supportsCSS() function</h3> 1.29 + <h3 id=the-css-interface><span class=secno>8.6. </span> The <a 1.30 + href="#CSS-interface"><code>CSS</code></a> interface, and the <code 1.31 + title="">supports()</code> function</h3> 1.32 1.33 - <pre class=idl>partial interface Window { 1.34 - boolean supportsCSS (DOMString property, DOMString value); 1.35 -};</pre> 1.36 + <p>The <dfn id=CSS-interface><code>CSS</code></dfn> interface holds 1.37 + useful CSS-related functions that do not belong elsewhere. 1.38 1.39 - <p>The <code>supportsCSS</code> function must return <code>true</code> if 1.40 - the implementation <a href="#dfn-support"><i>supports</i></a> the value 1.41 - given by <var>value</var> for the property given by <var>property</var>, 1.42 - and <code>false</code> otherwise. 1.43 + <pre class=idl>interface CSS { 1.44 + boolean supports(DOMString property, DOMString value); 1.45 + boolean supports(DOMString declaration); 1.46 +}</pre> 1.47 + 1.48 + <dl class=idl-methods> 1.49 + <dt><code>supports(DOMString property, DOMString value)</code>, returns 1.50 + <code>boolean</code> 1.51 + 1.52 + <dt><code>supports(DOMString declaration)</code>, returns 1.53 + <code>boolean</code> 1.54 + 1.55 + <dd> When the <code title="">supports()</code> method is invoked with 1.56 + two arguments <var>property</var> and <var>value</var>, it must return 1.57 + <code>true</code> if <var>property</var> is a literal match for the 1.58 + name of a CSS property that the UA supports, and <var>value</var> would 1.59 + be successfully parsed as a supported value for that property. 1.60 + Otherwise, it must return <code>false</code>. 1.61 + <p> When invoked with a single <var>declaration</var> argument, it must 1.62 + return <code>true</code> if <var>declaration</var>, when parsed as a 1.63 + declaration, represents a valid declaration for a property that the UA 1.64 + supports. Otherwise, it must return <code>false</code>. 1.65 + </dl> 1.66 1.67 <h2 id=conformance><span class=secno>9. </span>Conformance</h2> 1.68 1.69 @@ -1518,6 +1539,9 @@ 1.70 title="conformance, style sheet"><strong>9.2.</strong></a> 1.71 </ul> 1.72 1.73 + <li><a href="#CSS-interface"><code>CSS</code></a>, <a 1.74 + href="#CSS-interface" title=CSS><strong>8.6.</strong></a> 1.75 + 1.76 <li><a href="#cssconditionrule"><code>CSSConditionRule</code></a>, <a 1.77 href="#cssconditionrule" 1.78 title=CSSConditionRule><strong>8.2.</strong></a>
2.1 --- a/css3-conditional/Overview.src.html Fri Aug 31 12:33:26 2012 -0700 2.2 +++ b/css3-conditional/Overview.src.html Fri Aug 31 13:30:08 2012 -0700 2.3 @@ -800,8 +800,8 @@ 2.4 <h3 id="the-cssconditionrule-interface"> 2.5 The <code>CSSConditionRule</code> interface</h3> 2.6 2.7 -<p>The <dfn><code>CSSConditionRule</code></dfn> interface represents all the "conditional" rules, 2.8 - which consist of a condition and other rules nested inside of it. 2.9 +<p>The <dfn><code>CSSConditionRule</code></dfn> interface represents all the "conditional" at-rules, 2.10 + which consist of a condition and a statement block. 2.11 2.12 <pre class='idl'>interface CSSConditionRule : CSSRule { 2.13 attribute DOMString conditionText; 2.14 @@ -893,15 +893,35 @@ 2.15 }</pre> 2.16 2.17 2.18 -<h3 id="window-api">supportsCSS() function</h3> 2.19 +<h3 id='the-css-interface'> 2.20 +The <code>CSS</code> interface, and the <code title=''>supports()</code> function</h3> 2.21 2.22 -<pre class='idl'>partial interface Window { 2.23 - boolean supportsCSS (DOMString property, DOMString value); 2.24 -};</pre> 2.25 +<p>The <dfn id='CSS-interface'><code>CSS</code></dfn> interface holds useful CSS-related functions that do not belong elsewhere. 2.26 2.27 -<p>The <code>supportsCSS</code> function must return <code>true</code> 2.28 -if the implementation <i>supports</i> the value given by <var>value</var> for 2.29 -the property given by <var>property</var>, and <code>false</code> otherwise. 2.30 +<pre class='idl'>interface CSS { 2.31 + boolean supports(DOMString property, DOMString value); 2.32 + boolean supports(DOMString declaration); 2.33 +}</pre> 2.34 + 2.35 +<dl class='idl-methods'> 2.36 + <dt><code>supports(DOMString property, DOMString value)</code>, 2.37 + returns <code>boolean</code> 2.38 + <dt><code>supports(DOMString declaration)</code>, 2.39 + returns <code>boolean</code> 2.40 + <dd> 2.41 + When the <code title=''>supports()</code> method is invoked with two arguments <var>property</var> and <var>value</var>, 2.42 + it must return <code>true</code> if <var>property</var> is a literal match for the name of a CSS property that the UA supports, 2.43 + and <var>value</var> would be successfully parsed as a supported value for that property. 2.44 + Otherwise, it must return <code>false</code>. 2.45 + 2.46 + <p> 2.47 + When invoked with a single <var>declaration</var> argument, 2.48 + it must return <code>true</code> if <var>declaration</var>, 2.49 + when parsed as a declaration, 2.50 + represents a valid declaration for a property that the UA supports. 2.51 + Otherwise, it must return <code>false</code>. 2.52 + </dl> 2.53 + 2.54 2.55 <h2 id="conformance">Conformance</h2> 2.56