|
16 | 16 | <h1>CSS Object Model (CSSOM)</h1> |
17 | 17 |
|
18 | 18 |
|
19 | | - <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 7 October 2013</h2> |
| 19 | + <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 10 October 2013</h2> |
20 | 20 |
|
21 | 21 | <dl> |
22 | 22 |
|
@@ -90,7 +90,7 @@ <h2 class="no-num no-toc" id="sotd">Status of This Document</h2> |
90 | 90 | can be found in the |
91 | 91 | <a href="http://www.w3.org/TR/">W3C technical reports index at http://www.w3.org/TR/.</a></em> |
92 | 92 |
|
93 | | -<p class="dontpublish">This is the 7 October 2013 Editor's Draft of CSSOM. Please send comments to |
| 93 | +<p class="dontpublish">This is the 10 October 2013 Editor's Draft of CSSOM. Please send comments to |
94 | 94 | <a href="mailto:www-style@w3.org?subject=%5Bcssom%5D%20">www-style@w3.org</a> |
95 | 95 | (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) |
96 | 96 | with <samp>[cssom]</samp> at the start of the subject line. |
@@ -181,10 +181,13 @@ <h2 class="no-num no-toc" id="toc">Table of Contents</h2> |
181 | 181 | <li><a href="#the-getstyleutils-interface"><span class="secno">7.3 </span>The <code title="">GetStyleUtils</code> Interface</a></li> |
182 | 182 | <li><a href="#extensions-to-the-element-interface"><span class="secno">7.4 </span>Extensions to the <code title="">Element</code> Interface</a></li> |
183 | 183 | <li><a href="#the-pseudoelement-interface"><span class="secno">7.5 </span>The <code title="">PseudoElement</code> Interface</a></ul></li> |
184 | | - <li><a href="#resolved-values"><span class="secno">8 </span>Resolved Values</a></li> |
185 | | - <li><a href="#iana-considerations"><span class="secno">9 </span>IANA Considerations</a> |
| 184 | + <li><a href="#utility-apis"><span class="secno">8 </span>Utility APIs</a> |
186 | 185 | <ul class="toc"> |
187 | | - <li><a href="#default-style"><span class="secno">9.1 </span><code title="">Default-Style</code></a></ul></li> |
| 186 | + <li><a href="#the-css.escape()-method"><span class="secno">8.1 </span>The <code title="">CSS.escape()</code> Method</a></ul></li> |
| 187 | + <li><a href="#resolved-values"><span class="secno">9 </span>Resolved Values</a></li> |
| 188 | + <li><a href="#iana-considerations"><span class="secno">10 </span>IANA Considerations</a> |
| 189 | + <ul class="toc"> |
| 190 | + <li><a href="#default-style"><span class="secno">10.1 </span><code title="">Default-Style</code></a></ul></li> |
188 | 191 | <li><a class="no-num" href="#references">References</a></li> |
189 | 192 | <li><a class="no-num" href="#change-history">Change History</a> |
190 | 193 | <ul class="toc"> |
@@ -3113,7 +3116,32 @@ <h3 id="the-pseudoelement-interface"><span class="secno">7.5 </span>The <code ti |
3113 | 3116 | <a href="#pseudoelement">PseudoElement</a> implements <a href="#getstyleutils">GetStyleUtils</a>;</pre> |
3114 | 3117 |
|
3115 | 3118 |
|
3116 | | -<h2 id="resolved-values"><span class="secno">8 </span>Resolved Values</h2> |
| 3119 | +<h2 id="utility-apis"><span class="secno">8 </span>Utility APIs</h2> |
| 3120 | + |
| 3121 | +<h3 id="the-css.escape()-method"><span class="secno">8.1 </span>The <code title="">CSS.escape()</code> Method</h3> |
| 3122 | + |
| 3123 | +<p>The <code title="">CSS</code> interface is defined in CSS Conditional Rules Module. <a href="#refsCSSCONDITIONAL">[CSSCONDITIONAL]</a> |
| 3124 | + |
| 3125 | +<pre class="idl">partial interface CSS { |
| 3126 | + static DOMString <a href="#dom-css-escape" title="dom-CSS-escape">escape</a>(DOMString ident); |
| 3127 | +};</pre> |
| 3128 | + |
| 3129 | +<p>The <dfn id="dom-css-escape" title="dom-CSS-escape"><code>escape(<var>ident</var>)</code></dfn> method must return the result of invoking <a href="#serialize-an-identifier">serialize an identifier</a> of |
| 3130 | +<var>ident</var>. Any exceptions thrown must be re-thrown. |
| 3131 | + |
| 3132 | +<div class="example"> |
| 3133 | + <p>For example, to escape a string for use as part of a selector, the <code title="dom-CSS-escape"><a href="#dom-css-escape">escape()</a></code> method can be used: |
| 3134 | + <pre>var element = document.querySelector('#' + CSS.escape(id) + ' > img');</pre> |
| 3135 | +</div> |
| 3136 | + |
| 3137 | +<div class="example"> |
| 3138 | + <p>The <code title="dom-CSS-escape"><a href="#dom-css-escape">escape()</a></code> method can also be used for escaping strings, although it escapes characters that don't strictly need to be |
| 3139 | + escaped: |
| 3140 | + <pre>var element = document.querySelector('a[href="#' + CSS.escape(fragment) + '"]');</pre> |
| 3141 | +</div> |
| 3142 | + |
| 3143 | + |
| 3144 | +<h2 id="resolved-values"><span class="secno">9 </span>Resolved Values</h2> |
3117 | 3145 |
|
3118 | 3146 | <p><code title="dom-Window-getComputedStyle"><a href="#dom-window-getcomputedstyle">getComputedStyle()</a></code> was |
3119 | 3147 | historically defined to return the "computed value" of an element or |
@@ -3190,10 +3218,10 @@ <h2 id="resolved-values"><span class="secno">8 </span>Resolved Values</h2> |
3190 | 3218 | </dl> |
3191 | 3219 |
|
3192 | 3220 |
|
3193 | | -<h2 id="iana-considerations"><span class="secno">9 </span>IANA Considerations</h2> |
| 3221 | +<h2 id="iana-considerations"><span class="secno">10 </span>IANA Considerations</h2> |
3194 | 3222 |
|
3195 | 3223 |
|
3196 | | -<h3 id="default-style"><span class="secno">9.1 </span><dfn title="http-default-style"><code title="">Default-Style</code></dfn></h3> |
| 3224 | +<h3 id="default-style"><span class="secno">10.1 </span><dfn title="http-default-style"><code title="">Default-Style</code></dfn></h3> |
3197 | 3225 |
|
3198 | 3226 | <p>This section describes a header field for registration in the Permanent |
3199 | 3227 | Message Header Field Registry. |
@@ -3223,6 +3251,9 @@ <h2 class="no-num" id="references">References</h2> |
3223 | 3251 | <dt id="refsCSSCASCADE">[CSSCASCADE] |
3224 | 3252 | <dd><cite><a href="http://dev.w3.org/csswg/css-cascade/">CSS Cascading and Inheritance</a></cite>, Håkon Wium Lie, fantasai and Tab Atkins Jr.. |
3225 | 3253 |
|
| 3254 | +<dt id="refsCSSCONDITIONAL">[CSSCONDITIONAL] |
| 3255 | +<dd><cite><a href="http://dev.w3.org/csswg/css-conditional/">CSS Conditional Rules Module</a></cite>, L. David Baron. |
| 3256 | + |
3226 | 3257 | <dt id="refsCSSNAMESPACES">[CSSNAMESPACES] |
3227 | 3258 | <dd><cite><a href="http://dev.w3.org/csswg/css-namespaces/">CSS Namespaces Module</a></cite>, Elika J. Etemad and Anne van Kesteren. W3C. |
3228 | 3259 |
|
|
0 commit comments