Skip to content

Commit 081b26f

Browse files
author
Simon Pieters
committed
1 parent ac0a99c commit 081b26f

2 files changed

Lines changed: 64 additions & 8 deletions

File tree

cssom/Overview.html

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<h1>CSS Object Model (CSSOM)</h1>
1717

1818

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>
2020

2121
<dl>
2222

@@ -90,7 +90,7 @@ <h2 class="no-num no-toc" id="sotd">Status of This Document</h2>
9090
can be found in the
9191
<a href="http://www.w3.org/TR/">W3C technical reports index at http://www.w3.org/TR/.</a></em>
9292

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
9494
<a href="mailto:www-style@w3.org?subject=%5Bcssom%5D%20">www-style@w3.org</a>
9595
(<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>)
9696
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>
181181
<li><a href="#the-getstyleutils-interface"><span class="secno">7.3 </span>The <code title="">GetStyleUtils</code> Interface</a></li>
182182
<li><a href="#extensions-to-the-element-interface"><span class="secno">7.4 </span>Extensions to the <code title="">Element</code> Interface</a></li>
183183
<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>
186185
<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>
188191
<li><a class="no-num" href="#references">References</a></li>
189192
<li><a class="no-num" href="#change-history">Change History</a>
190193
<ul class="toc">
@@ -3113,7 +3116,32 @@ <h3 id="the-pseudoelement-interface"><span class="secno">7.5 </span>The <code ti
31133116
<a href="#pseudoelement">PseudoElement</a> implements <a href="#getstyleutils">GetStyleUtils</a>;</pre>
31143117

31153118

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) + ' &gt; 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>
31173145

31183146
<p><code title="dom-Window-getComputedStyle"><a href="#dom-window-getcomputedstyle">getComputedStyle()</a></code> was
31193147
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>
31903218
</dl>
31913219

31923220

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>
31943222

31953223

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>
31973225

31983226
<p>This section describes a header field for registration in the Permanent
31993227
Message Header Field Registry.
@@ -3223,6 +3251,9 @@ <h2 class="no-num" id="references">References</h2>
32233251
<dt id="refsCSSCASCADE">[CSSCASCADE]
32243252
<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..
32253253

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+
32263257
<dt id="refsCSSNAMESPACES">[CSSNAMESPACES]
32273258
<dd><cite><a href="http://dev.w3.org/csswg/css-namespaces/">CSS Namespaces Module</a></cite>, Elika J. Etemad and Anne van Kesteren. W3C.
32283259

cssom/Overview.src.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3033,6 +3033,31 @@ <h3>The <code title>PseudoElement</code> Interface</h3>
30333033
<span>PseudoElement</span> implements <span>GetStyleUtils</span>;</pre>
30343034

30353035

3036+
<h2>Utility APIs</h2>
3037+
3038+
<h3>The <code title>CSS.escape()</code> Method</h3>
3039+
3040+
<p>The <code title>CSS</code> interface is defined in CSS Conditional Rules Module. <span data-anolis-ref>CSSCONDITIONAL</span>
3041+
3042+
<pre class=idl>partial interface CSS {
3043+
static DOMString <span title=dom-CSS-escape>escape</span>(DOMString ident);
3044+
};</pre>
3045+
3046+
<p>The <dfn title=dom-CSS-escape><code>escape(<var>ident</var>)</code></dfn> method must return the result of invoking <span>serialize an identifier</span> of
3047+
<var>ident</var>. Any exceptions thrown must be re-thrown.
3048+
3049+
<div class=example>
3050+
<p>For example, to escape a string for use as part of a selector, the <code title=dom-CSS-escape>escape()</code> method can be used:
3051+
<pre>var element = document.querySelector('#' + CSS.escape(id) + ' > img');</pre>
3052+
</div>
3053+
3054+
<div class=example>
3055+
<p>The <code title=dom-CSS-escape>escape()</code> method can also be used for escaping strings, although it escapes characters that don't strictly need to be
3056+
escaped:
3057+
<pre>var element = document.querySelector('a[href="#' + CSS.escape(fragment) + '"]');</pre>
3058+
</div>
3059+
3060+
30363061
<h2>Resolved Values</h2>
30373062

30383063
<p><code title="dom-Window-getComputedStyle">getComputedStyle()</code> was

0 commit comments

Comments
 (0)