[html5] r5695 - [agiow] (0) Define how we create a 'specified CSS element reference identifier'. [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed Dec 1 16:09:56 PST 2010
Author: ianh
Date: 2010-12-01 16:09:55 -0800 (Wed, 01 Dec 2010)
New Revision: 5695
Modified:
complete.html
index
source
Log:
[agiow] (0) Define how we create a 'specified CSS element reference identifier'. This maybe should move from HTML to CSSOM.
Modified: complete.html
===================================================================
--- complete.html 2010-12-01 00:51:18 UTC (rev 5694)
+++ complete.html 2010-12-02 00:09:55 UTC (rev 5695)
@@ -214,7 +214,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1>Web Applications 1.0</h1>
- <h2 class="no-num no-toc">Draft Standard — 1 December 2010</h2>
+ <h2 class="no-num no-toc">Draft Standard — 2 December 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -368,9 +368,10 @@
<li><a href=#domsettabletokenlist-0><span class=secno>2.8.4 </span>DOMSettableTokenList</a></li>
<li><a href=#safe-passing-of-structured-data><span class=secno>2.8.5 </span>Safe passing of structured data</a></li>
<li><a href=#domstringmap-0><span class=secno>2.8.6 </span>DOMStringMap</a></li>
- <li><a href=#dom-feature-strings><span class=secno>2.8.7 </span>DOM feature strings</a></li>
- <li><a href=#exceptions><span class=secno>2.8.8 </span>Exceptions</a></li>
- <li><a href=#garbage-collection><span class=secno>2.8.9 </span>Garbage collection</a></ol></li>
+ <li><a href=#domelementmap-0><span class=secno>2.8.7 </span>DOMElementMap</a></li>
+ <li><a href=#dom-feature-strings><span class=secno>2.8.8 </span>DOM feature strings</a></li>
+ <li><a href=#exceptions><span class=secno>2.8.9 </span>Exceptions</a></li>
+ <li><a href=#garbage-collection><span class=secno>2.8.10 </span>Garbage collection</a></ol></li>
<li><a href=#namespaces><span class=secno>2.9 </span>Namespaces</a></ol></li>
<li><a href=#dom><span class=secno>3 </span>Semantics, structure, and APIs of HTML documents</a>
<ol>
@@ -7903,8 +7904,58 @@
</div>
- <h4 id=dom-feature-strings><span class=secno>2.8.7 </span>DOM feature strings</h4>
+<!--CSSREF-->
+ <h4 id=domelementmap-0><span class=secno>2.8.7 </span>DOMElementMap</h4>
+ <p>The <code><a href=#domelementmap>DOMElementMap</a></code> interface represents a set of
+ name-element mappings. It exposes these using the scripting
+ language's native mechanisms for property access.</p>
+
+ <div class=impl>
+
+ <p>When a <code><a href=#domelementmap>DOMElementMap</a></code> object is instantiated, it is
+ associated with three algorithms, one for getting the list of
+ name-element mappings, one for mapping a name to a certain element,
+ and one for deleting mappings by name.</p>
+
+ <pre class=idl>interface <dfn id=domelementmap>DOMElementMap</dfn> {
+ <a href=#dom-domelementmap-nameditem title=dom-DOMElementMap-namedItem>getter</a> DOMString (in DOMString name);
+ <a href=#dom-domelementmap-setitem title=dom-DOMElementMap-setItem>setter</a> void (in DOMString name, in <a href=#element>Element</a> value);
+ <a href=#dom-domelementmap-additem title=dom-DOMElementMap-addItem>creator</a> void (in DOMString name, in <a href=#element>Element</a> value);
+ <a href=#dom-domelementmap-removeitem title=dom-DOMElementMap-removeItem>deleter</a> void (in DOMString name);
+};</pre>
+
+ <p>The <a href=#supported-property-names>supported property names</a> on a
+ <code><a href=#domelementmap>DOMElementMap</a></code> object at any instant are the names for
+ each mapping returned from the algorithm for getting the list of
+ name-element mappings at that instant.</p>
+
+ <p>To <dfn id=dom-domelementmap-nameditem title=dom-DOMElementMap-namedItem>determine the value
+ of a named property</dfn> <var title="">name</var> in a
+ <code><a href=#domelementmap>DOMElementMap</a></code>, the user agent must return the element
+ component of the name-element mapping whose name component is <var title="">name</var> in the list returned by the algorithm for
+ getting the list of name-element mappings.</p>
+
+ <p>To set the value of a <dfn id=dom-domelementmap-additem title=dom-DOMElementMap-addItem>new</dfn> or <dfn id=dom-domelementmap-setitem title=dom-DOMElementMap-setItem>existing</dfn> named property <var title="">name</var> to value <var title="">value</var>, the
+ algorithm for mapping a name to a certain element must be run,
+ passing <var title="">name</var> as the name <var title="">value</var> as the element.</p>
+
+ <p>To <dfn id=dom-domelementmap-removeitem title=dom-DOMElementMap-removeItem>delete an existing
+ named property</dfn> <var title="">name</var>, the algorithm for
+ deleting mappings must be run, passing <var title="">name</var> as
+ the name component of the mapping to be deleted.</p>
+
+ <p class=note>The <code><a href=#domelementmap>DOMElementMap</a></code> interface definition
+ here is only intended for JavaScript environments. Other language
+ bindings will need to define how <code><a href=#domelementmap>DOMElementMap</a></code> is to be
+ implemented for those languages.</p>
+
+ </div>
+<!--CSSREF-->
+
+
+ <h4 id=dom-feature-strings><span class=secno>2.8.8 </span>DOM feature strings</h4>
+
<p>DOM3 Core defines mechanisms for checking for interface support,
and for obtaining implementations of interfaces, using <a href=http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMFeatures>feature
strings</a>. <a href=#refsDOMCORE>[DOMCORE]</a></p>
@@ -7925,7 +7976,7 @@
</div>
- <h4 id=exceptions><span class=secno>2.8.8 </span>Exceptions</h4>
+ <h4 id=exceptions><span class=secno>2.8.9 </span>Exceptions</h4>
<p>The following are <code><a href=#domexception>DOMException</a></code> codes. <a href=#refsDOMCORE>[DOMCORE]</a></p>
@@ -7972,7 +8023,7 @@
<div class=impl>
- <h4 id=garbage-collection><span class=secno>2.8.9 </span>Garbage collection</h4>
+ <h4 id=garbage-collection><span class=secno>2.8.10 </span>Garbage collection</h4>
<p>There is an <dfn id=implied-strong-reference>implied strong reference</dfn> from any IDL
attribute that returns a pre-existing object to that object.</p>
@@ -8097,6 +8148,7 @@
NodeList <a href=#dom-document-getelementsbyname title=dom-document-getElementsByName>getElementsByName</a>(in DOMString elementName);
NodeList <a href=#dom-document-getelementsbyclassname title=dom-document-getElementsByClassName>getElementsByClassName</a>(in DOMString classNames);
<!--MD--> NodeList <a href=#dom-document-getitems title=dom-document-getItems>getItems</a>(in optional DOMString typeNames); // <a href=#microdata>microdata</a> <!--WARNING: ALSO DUPLICATED IN MICRODATA SECTION--><!--MD-->
+<!--CSSREF--> readonly attribute <a href=#domelementmap>DOMElementMap</a> <a href=#dom-document-csselementmap title=dom-document-cssElementMap>cssElementMap</a>;<!--CSSREF-->
// <a href=#dynamic-markup-insertion>dynamic markup insertion</a>
attribute DOMString <a href=#dom-innerhtml title=dom-innerHTML>innerHTML</a>;
@@ -8769,6 +8821,85 @@
> optional tag name.
-->
+<!--CSSREF-->
+ <hr><dl class=domintro><dt><var title="">element</var> . <code title=dom-document-cssElementMap><a href=#dom-document-csselementmap>cssElementMap</a></code></dt>
+ <dd>
+
+ <p>Returns a <code><a href=#domelementmap>DOMElementMap</a></code> object for the
+ <code><a href=#document>Document</a></code> representing the current <span title="specified CSS element reference identifier">specified CSS
+ element reference identifiers</span>.</p>
+
+ </dd>
+
+ </dl><div class=impl>
+
+ <p>The <dfn id=dom-document-csselementmap title=dom-document-cssElementMap><code>cssElementMap</code></dfn>
+ IDL attribute allows authors to define <span>title="specified CSS
+ element reference identifier">specified CSS element reference
+ identifiers</span>, which are used in certain CSS features to
+ override the normal <a href=#concept-id title=concept-id>ID</a>-based
+ mapping. <a href=#refsCSSIMAGES>[CSSIMAGES]</a></p>
+
+ <p>When a <code><a href=#document>Document</a></code> is created, it must be associated
+ with an initially-empty <dfn id=css-id-overrides-list>CSS ID overrides list</dfn>, which
+ consists of a list of mappings each of which consists of a string
+ name mapped to an <code><a href=#element>Element</a></code> node.</p>
+
+ <p>Each entry in the <a href=#css-id-overrides-list>CSS ID overrides list</a>, while it is
+ in the list, defines a <span>specified CSS element reference
+ identifier</span> mapping the given name to the given
+ <code><a href=#element>Element</a></code>. <a href=#refsCSSIMAGES>[CSSIMAGES]</a></p>
+
+ <p>On getting, the <code title=dom-document-cssElementMap><a href=#dom-document-csselementmap>cssElementMap</a></code> IDL
+ attribute must return a <code><a href=#domelementmap>DOMElementMap</a></code> object,
+ associated with the following algorithms, which expose the current
+ mappings:</p>
+
+ <dl><dt>The algorithm for getting the list of name-element mappings</dt>
+
+ <dd>
+
+ <p>Return the <code><a href=#document>Document</a></code>'s <a href=#css-id-overrides-list>CSS ID overrides
+ list</a>, maintaining the order in which the entries were
+ originally added to the list.</p>
+
+ </dd>
+
+ <dt>The algorithm for for mapping a name to a certain element</dt>
+
+ <dd>
+
+ <p>Let <var title="">name</var> be the name passed to the
+ algorithm and <var title="">element</var> be the
+ <code><a href=#element>Element</a></code> passed to the algorithm.</p>
+
+ <p>If <var title="">element</var> is null, run the algorithm for
+ deleting mappings by name, passing it <var title="">name</var>.</p>
+
+ <p>Otherwise, if there is an entry in the <code><a href=#document>Document</a></code>'s
+ <a href=#css-id-overrides-list>CSS ID overrides list</a> whose name is <var title="">name</var>, replace its current value with <var title="">element</var>.</p>
+
+ <p>Otherwise, add a mapping to the <code><a href=#document>Document</a></code>'s
+ <a href=#css-id-overrides-list>CSS ID overrides list</a> whose name is <var title="">name</var> and whose element is <var title="">element</var>.</p>
+
+ </dd>
+
+ <dt>The algorithm for deleting mappings by name</dt>
+
+ <dd>
+
+ <p>If there is an entry in the <code><a href=#document>Document</a></code>'s <a href=#css-id-overrides-list>CSS
+ ID overrides list</a> whose name is the name passed to this
+ algorithm, remove it. This also undefines the <span>specified CSS
+ element reference identifier</span> for that name. <a href=#refsCSSIMAGES>[CSSIMAGES]</a></p>
+
+ </dd>
+
+ </dl><p>The same object must be returned each time.</p>
+
+ </div>
+<!--CSSREF-->
+
<div class=impl>
<hr><p>The <code><a href=#htmldocument>HTMLDocument</a></code> interface <span title="support
@@ -92191,6 +92322,11 @@
<dd><cite><a href=http://www.w3.org/TR/css3-fonts/>CSS Fonts
Module Level 3</a></cite>, J. Daggett. W3C.</dd>
+ <dt id=refsCSSIMAGES>[CSSIMAGES]</dt>
+ <dd><cite><a href=http://dev.w3.org/csswg/css3-images/>CSS Image
+ Values and Replaced Content Module Level 3</a></cite>, E. Etemad,
+ T. Atkins. W3C.</dd>
+
<dt id=refsCSSOM>[CSSOM]</dt>
<dd><cite><a href=http://dev.w3.org/csswg/cssom/>Cascading Style Sheets
Object Model (CSSOM)</a></cite>, A. van Kesteren. W3C.</dd>
@@ -92208,7 +92344,8 @@
Interface Module</a></cite>, T. Çelik. W3C.</dd>
<dt id=refsCSSVALUES>[CSSVALUES]</dt>
- <dd><cite><a href=http://dev.w3.org/csswg/css3-values/>CSS3 Values and Units</a></cite>, H. Lie, C. Lilley. W3C.</dd>
+ <dd><cite><a href=http://dev.w3.org/csswg/css3-values/>CSS3
+ Values and Units</a></cite>, H. Lie, C. Lilley. W3C.</dd>
<dt id=refsDOMCORE>[DOMCORE]</dt>
<dd><cite><a href=http://www.w3.org/TR/DOM-Level-3-Core/>Document
Modified: index
===================================================================
--- index 2010-12-01 00:51:18 UTC (rev 5694)
+++ index 2010-12-02 00:09:55 UTC (rev 5695)
@@ -218,7 +218,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1>HTML5 (including next generation additions still in development)</h1>
- <h2 class="no-num no-toc">Draft Standard — 1 December 2010</h2>
+ <h2 class="no-num no-toc">Draft Standard — 2 December 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -375,9 +375,10 @@
<li><a href=#domsettabletokenlist-0><span class=secno>2.8.4 </span>DOMSettableTokenList</a></li>
<li><a href=#safe-passing-of-structured-data><span class=secno>2.8.5 </span>Safe passing of structured data</a></li>
<li><a href=#domstringmap-0><span class=secno>2.8.6 </span>DOMStringMap</a></li>
- <li><a href=#dom-feature-strings><span class=secno>2.8.7 </span>DOM feature strings</a></li>
- <li><a href=#exceptions><span class=secno>2.8.8 </span>Exceptions</a></li>
- <li><a href=#garbage-collection><span class=secno>2.8.9 </span>Garbage collection</a></ol></li>
+ <li><a href=#domelementmap-0><span class=secno>2.8.7 </span>DOMElementMap</a></li>
+ <li><a href=#dom-feature-strings><span class=secno>2.8.8 </span>DOM feature strings</a></li>
+ <li><a href=#exceptions><span class=secno>2.8.9 </span>Exceptions</a></li>
+ <li><a href=#garbage-collection><span class=secno>2.8.10 </span>Garbage collection</a></ol></li>
<li><a href=#namespaces><span class=secno>2.9 </span>Namespaces</a></ol></li>
<li><a href=#dom><span class=secno>3 </span>Semantics, structure, and APIs of HTML documents</a>
<ol>
@@ -1298,10 +1299,11 @@
beyond HTML5 (and that are therefore not included in the W3C version
of HTML5) currently consist of:</p>
- <ul class=brief><li>The <code><a href=#devices>device</a></code> element.</li>
- <li>The <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute and related <a href=#hyperlink-auditing>hyperlink auditing</a> features.</li>
- <li>The <a href=#websrt>WebSRT</a> formata and some <a href=#timed-track>timed track</a> API features.</li>
- <li>Rules for <a href=#atom>converting HTML to Atom</a>.</li>
+ <ul class=brief><li>The <code><a href=#devices>device</a></code> element.</li> <!--DEVICE-->
+ <li>The <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute and related <a href=#hyperlink-auditing>hyperlink auditing</a> features.</li> <!--PING-->
+ <li>The <a href=#websrt>WebSRT</a> formata and some <a href=#timed-track>timed track</a> API features.</li> <!--TT--> <!--TTSRT-->
+ <li>Rules for <a href=#atom>converting HTML to Atom</a>.</li> <!--MD-->
+ <li>The <code title=dom-document-cssElementMap><a href=#dom-document-csselementmap>cssElementMap</a></code> feature for defining <span title="specified CSS element reference identifier">specified CSS element reference identifiers</span>.</li> <!--CSSREF-->
</ul><p>Features that are part of HTML (and this specification) but that
are currently published as separate specifications as well, and are
not included in the W3C HTML5 specification, consist of:</p>
@@ -7880,8 +7882,58 @@
</div>
- <h4 id=dom-feature-strings><span class=secno>2.8.7 </span>DOM feature strings</h4>
+<!--CSSREF-->
+ <h4 id=domelementmap-0><span class=secno>2.8.7 </span>DOMElementMap</h4>
+ <p>The <code><a href=#domelementmap>DOMElementMap</a></code> interface represents a set of
+ name-element mappings. It exposes these using the scripting
+ language's native mechanisms for property access.</p>
+
+ <div class=impl>
+
+ <p>When a <code><a href=#domelementmap>DOMElementMap</a></code> object is instantiated, it is
+ associated with three algorithms, one for getting the list of
+ name-element mappings, one for mapping a name to a certain element,
+ and one for deleting mappings by name.</p>
+
+ <pre class=idl>interface <dfn id=domelementmap>DOMElementMap</dfn> {
+ <a href=#dom-domelementmap-nameditem title=dom-DOMElementMap-namedItem>getter</a> DOMString (in DOMString name);
+ <a href=#dom-domelementmap-setitem title=dom-DOMElementMap-setItem>setter</a> void (in DOMString name, in <a href=#element>Element</a> value);
+ <a href=#dom-domelementmap-additem title=dom-DOMElementMap-addItem>creator</a> void (in DOMString name, in <a href=#element>Element</a> value);
+ <a href=#dom-domelementmap-removeitem title=dom-DOMElementMap-removeItem>deleter</a> void (in DOMString name);
+};</pre>
+
+ <p>The <a href=#supported-property-names>supported property names</a> on a
+ <code><a href=#domelementmap>DOMElementMap</a></code> object at any instant are the names for
+ each mapping returned from the algorithm for getting the list of
+ name-element mappings at that instant.</p>
+
+ <p>To <dfn id=dom-domelementmap-nameditem title=dom-DOMElementMap-namedItem>determine the value
+ of a named property</dfn> <var title="">name</var> in a
+ <code><a href=#domelementmap>DOMElementMap</a></code>, the user agent must return the element
+ component of the name-element mapping whose name component is <var title="">name</var> in the list returned by the algorithm for
+ getting the list of name-element mappings.</p>
+
+ <p>To set the value of a <dfn id=dom-domelementmap-additem title=dom-DOMElementMap-addItem>new</dfn> or <dfn id=dom-domelementmap-setitem title=dom-DOMElementMap-setItem>existing</dfn> named property <var title="">name</var> to value <var title="">value</var>, the
+ algorithm for mapping a name to a certain element must be run,
+ passing <var title="">name</var> as the name <var title="">value</var> as the element.</p>
+
+ <p>To <dfn id=dom-domelementmap-removeitem title=dom-DOMElementMap-removeItem>delete an existing
+ named property</dfn> <var title="">name</var>, the algorithm for
+ deleting mappings must be run, passing <var title="">name</var> as
+ the name component of the mapping to be deleted.</p>
+
+ <p class=note>The <code><a href=#domelementmap>DOMElementMap</a></code> interface definition
+ here is only intended for JavaScript environments. Other language
+ bindings will need to define how <code><a href=#domelementmap>DOMElementMap</a></code> is to be
+ implemented for those languages.</p>
+
+ </div>
+<!--CSSREF-->
+
+
+ <h4 id=dom-feature-strings><span class=secno>2.8.8 </span>DOM feature strings</h4>
+
<p>DOM3 Core defines mechanisms for checking for interface support,
and for obtaining implementations of interfaces, using <a href=http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMFeatures>feature
strings</a>. <a href=#refsDOMCORE>[DOMCORE]</a></p>
@@ -7902,7 +7954,7 @@
</div>
- <h4 id=exceptions><span class=secno>2.8.8 </span>Exceptions</h4>
+ <h4 id=exceptions><span class=secno>2.8.9 </span>Exceptions</h4>
<p>The following are <code><a href=#domexception>DOMException</a></code> codes. <a href=#refsDOMCORE>[DOMCORE]</a></p>
@@ -7949,7 +8001,7 @@
<div class=impl>
- <h4 id=garbage-collection><span class=secno>2.8.9 </span>Garbage collection</h4>
+ <h4 id=garbage-collection><span class=secno>2.8.10 </span>Garbage collection</h4>
<p>There is an <dfn id=implied-strong-reference>implied strong reference</dfn> from any IDL
attribute that returns a pre-existing object to that object.</p>
@@ -8074,6 +8126,7 @@
NodeList <a href=#dom-document-getelementsbyname title=dom-document-getElementsByName>getElementsByName</a>(in DOMString elementName);
NodeList <a href=#dom-document-getelementsbyclassname title=dom-document-getElementsByClassName>getElementsByClassName</a>(in DOMString classNames);
<!--MD--> NodeList <a href=#dom-document-getitems title=dom-document-getItems>getItems</a>(in optional DOMString typeNames); // <a href=#microdata>microdata</a> <!--WARNING: ALSO DUPLICATED IN MICRODATA SECTION--><!--MD-->
+<!--CSSREF--> readonly attribute <a href=#domelementmap>DOMElementMap</a> <a href=#dom-document-csselementmap title=dom-document-cssElementMap>cssElementMap</a>;<!--CSSREF-->
// <a href=#dynamic-markup-insertion>dynamic markup insertion</a>
attribute DOMString <a href=#dom-innerhtml title=dom-innerHTML>innerHTML</a>;
@@ -8746,6 +8799,85 @@
> optional tag name.
-->
+<!--CSSREF-->
+ <hr><dl class=domintro><dt><var title="">element</var> . <code title=dom-document-cssElementMap><a href=#dom-document-csselementmap>cssElementMap</a></code></dt>
+ <dd>
+
+ <p>Returns a <code><a href=#domelementmap>DOMElementMap</a></code> object for the
+ <code><a href=#document>Document</a></code> representing the current <span title="specified CSS element reference identifier">specified CSS
+ element reference identifiers</span>.</p>
+
+ </dd>
+
+ </dl><div class=impl>
+
+ <p>The <dfn id=dom-document-csselementmap title=dom-document-cssElementMap><code>cssElementMap</code></dfn>
+ IDL attribute allows authors to define <span>title="specified CSS
+ element reference identifier">specified CSS element reference
+ identifiers</span>, which are used in certain CSS features to
+ override the normal <a href=#concept-id title=concept-id>ID</a>-based
+ mapping. <a href=#refsCSSIMAGES>[CSSIMAGES]</a></p>
+
+ <p>When a <code><a href=#document>Document</a></code> is created, it must be associated
+ with an initially-empty <dfn id=css-id-overrides-list>CSS ID overrides list</dfn>, which
+ consists of a list of mappings each of which consists of a string
+ name mapped to an <code><a href=#element>Element</a></code> node.</p>
+
+ <p>Each entry in the <a href=#css-id-overrides-list>CSS ID overrides list</a>, while it is
+ in the list, defines a <span>specified CSS element reference
+ identifier</span> mapping the given name to the given
+ <code><a href=#element>Element</a></code>. <a href=#refsCSSIMAGES>[CSSIMAGES]</a></p>
+
+ <p>On getting, the <code title=dom-document-cssElementMap><a href=#dom-document-csselementmap>cssElementMap</a></code> IDL
+ attribute must return a <code><a href=#domelementmap>DOMElementMap</a></code> object,
+ associated with the following algorithms, which expose the current
+ mappings:</p>
+
+ <dl><dt>The algorithm for getting the list of name-element mappings</dt>
+
+ <dd>
+
+ <p>Return the <code><a href=#document>Document</a></code>'s <a href=#css-id-overrides-list>CSS ID overrides
+ list</a>, maintaining the order in which the entries were
+ originally added to the list.</p>
+
+ </dd>
+
+ <dt>The algorithm for for mapping a name to a certain element</dt>
+
+ <dd>
+
+ <p>Let <var title="">name</var> be the name passed to the
+ algorithm and <var title="">element</var> be the
+ <code><a href=#element>Element</a></code> passed to the algorithm.</p>
+
+ <p>If <var title="">element</var> is null, run the algorithm for
+ deleting mappings by name, passing it <var title="">name</var>.</p>
+
+ <p>Otherwise, if there is an entry in the <code><a href=#document>Document</a></code>'s
+ <a href=#css-id-overrides-list>CSS ID overrides list</a> whose name is <var title="">name</var>, replace its current value with <var title="">element</var>.</p>
+
+ <p>Otherwise, add a mapping to the <code><a href=#document>Document</a></code>'s
+ <a href=#css-id-overrides-list>CSS ID overrides list</a> whose name is <var title="">name</var> and whose element is <var title="">element</var>.</p>
+
+ </dd>
+
+ <dt>The algorithm for deleting mappings by name</dt>
+
+ <dd>
+
+ <p>If there is an entry in the <code><a href=#document>Document</a></code>'s <a href=#css-id-overrides-list>CSS
+ ID overrides list</a> whose name is the name passed to this
+ algorithm, remove it. This also undefines the <span>specified CSS
+ element reference identifier</span> for that name. <a href=#refsCSSIMAGES>[CSSIMAGES]</a></p>
+
+ </dd>
+
+ </dl><p>The same object must be returned each time.</p>
+
+ </div>
+<!--CSSREF-->
+
<div class=impl>
<hr><p>The <code><a href=#htmldocument>HTMLDocument</a></code> interface <span title="support
@@ -88240,6 +88372,11 @@
<dd><cite><a href=http://www.w3.org/TR/css3-fonts/>CSS Fonts
Module Level 3</a></cite>, J. Daggett. W3C.</dd>
+ <dt id=refsCSSIMAGES>[CSSIMAGES]</dt>
+ <dd><cite><a href=http://dev.w3.org/csswg/css3-images/>CSS Image
+ Values and Replaced Content Module Level 3</a></cite>, E. Etemad,
+ T. Atkins. W3C.</dd>
+
<dt id=refsCSSOM>[CSSOM]</dt>
<dd><cite><a href=http://dev.w3.org/csswg/cssom/>Cascading Style Sheets
Object Model (CSSOM)</a></cite>, A. van Kesteren. W3C.</dd>
@@ -88257,7 +88394,8 @@
Interface Module</a></cite>, T. Çelik. W3C.</dd>
<dt id=refsCSSVALUES>[CSSVALUES]</dt>
- <dd><cite><a href=http://dev.w3.org/csswg/css3-values/>CSS3 Values and Units</a></cite>, H. Lie, C. Lilley. W3C.</dd>
+ <dd><cite><a href=http://dev.w3.org/csswg/css3-values/>CSS3
+ Values and Units</a></cite>, H. Lie, C. Lilley. W3C.</dd>
<dt id=refsDOMCORE>[DOMCORE]</dt>
<dd><cite><a href=http://www.w3.org/TR/DOM-Level-3-Core/>Document
Modified: source
===================================================================
--- source 2010-12-01 00:51:18 UTC (rev 5694)
+++ source 2010-12-02 00:09:55 UTC (rev 5695)
@@ -74,10 +74,11 @@
of HTML5) currently consist of:</p>
<ul class="brief">
- <li>The <code>device</code> element.</li>
- <li>The <code title="attr-hyperlink-ping">ping</code> attribute and related <span>hyperlink auditing</span> features.</li>
- <li>The <span>WebSRT</span> formata and some <span>timed track</span> API features.</li>
- <li>Rules for <a href="#atom">converting HTML to Atom</a>.</li>
+ <li>The <code>device</code> element.</li> <!--DEVICE-->
+ <li>The <code title="attr-hyperlink-ping">ping</code> attribute and related <span>hyperlink auditing</span> features.</li> <!--PING-->
+ <li>The <span>WebSRT</span> formata and some <span>timed track</span> API features.</li> <!--TT--> <!--TTSRT-->
+ <li>Rules for <a href="#atom">converting HTML to Atom</a>.</li> <!--MD-->
+ <li>The <code title="dom-document-cssElementMap">cssElementMap</code> feature for defining <span title="specified CSS element reference identifier">specified CSS element reference identifiers</span>.</li> <!--CSSREF-->
</ul>
<p>Features that are part of HTML (and this specification) but that
@@ -7776,6 +7777,61 @@
</div>
+<!--END w3c-html--><!--CSSREF-->
+ <h4>DOMElementMap</h4>
+
+ <p>The <code>DOMElementMap</code> interface represents a set of
+ name-element mappings. It exposes these using the scripting
+ language's native mechanisms for property access.</p>
+
+ <div class="impl">
+
+ <p>When a <code>DOMElementMap</code> object is instantiated, it is
+ associated with three algorithms, one for getting the list of
+ name-element mappings, one for mapping a name to a certain element,
+ and one for deleting mappings by name.</p>
+
+ <pre class="idl">interface <dfn>DOMElementMap</dfn> {
+ <span title="dom-DOMElementMap-namedItem">getter</span> DOMString (in DOMString name);
+ <span title="dom-DOMElementMap-setItem">setter</span> void (in DOMString name, in <span>Element</span> value);
+ <span title="dom-DOMElementMap-addItem">creator</span> void (in DOMString name, in <span>Element</span> value);
+ <span title="dom-DOMElementMap-removeItem">deleter</span> void (in DOMString name);
+};</pre>
+
+ <p>The <span>supported property names</span> on a
+ <code>DOMElementMap</code> object at any instant are the names for
+ each mapping returned from the algorithm for getting the list of
+ name-element mappings at that instant.</p>
+
+ <p>To <dfn title="dom-DOMElementMap-namedItem">determine the value
+ of a named property</dfn> <var title="">name</var> in a
+ <code>DOMElementMap</code>, the user agent must return the element
+ component of the name-element mapping whose name component is <var
+ title="">name</var> in the list returned by the algorithm for
+ getting the list of name-element mappings.</p>
+
+ <p>To set the value of a <dfn
+ title="dom-DOMElementMap-addItem">new</dfn> or <dfn
+ title="dom-DOMElementMap-setItem">existing</dfn> named property <var
+ title="">name</var> to value <var title="">value</var>, the
+ algorithm for mapping a name to a certain element must be run,
+ passing <var title="">name</var> as the name <var
+ title="">value</var> as the element.</p>
+
+ <p>To <dfn title="dom-DOMElementMap-removeItem">delete an existing
+ named property</dfn> <var title="">name</var>, the algorithm for
+ deleting mappings must be run, passing <var title="">name</var> as
+ the name component of the mapping to be deleted.</p>
+
+ <p class="note">The <code>DOMElementMap</code> interface definition
+ here is only intended for JavaScript environments. Other language
+ bindings will need to define how <code>DOMElementMap</code> is to be
+ implemented for those languages.</p>
+
+ </div>
+<!--START w3c-html--><!--CSSREF-->
+
+
<h4>DOM feature strings</h4>
<p>DOM3 Core defines mechanisms for checking for interface support,
@@ -7987,6 +8043,7 @@
NodeList <span title="dom-document-getElementsByName">getElementsByName</span>(in DOMString elementName);
NodeList <span title="dom-document-getElementsByClassName">getElementsByClassName</span>(in DOMString classNames);
<!--END w3c-html--><!--MD--> NodeList <span title="dom-document-getItems">getItems</span>(in optional DOMString typeNames); // <span>microdata</span> <!--WARNING: ALSO DUPLICATED IN MICRODATA SECTION--><!--START w3c-html--><!--MD-->
+<!--END w3c-html--><!--CSSREF--> readonly attribute <span>DOMElementMap</span> <span title="dom-document-cssElementMap">cssElementMap</span>;<!--START w3c-html--><!--CSSREF-->
// <span>dynamic markup insertion</span>
attribute DOMString <span title="dom-innerHTML">innerHTML</span>;
@@ -8793,8 +8850,105 @@
> optional tag name.
-->
+<!--END w3c-html--><!--CSSREF-->
+ <hr>
+
+ <dl class="domintro">
+
+ <dt><var title="">element</var> . <code title="dom-document-cssElementMap">cssElementMap</code></dt>
+ <dd>
+
+ <p>Returns a <code>DOMElementMap</code> object for the
+ <code>Document</code> representing the current <span
+ title="specified CSS element reference identifier">specified CSS
+ element reference identifiers</span>.</p>
+
+ </dd>
+
+ </dl>
+
<div class="impl">
+ <p>The <dfn
+ title="dom-document-cssElementMap"><code>cssElementMap</code></dfn>
+ IDL attribute allows authors to define <span>title="specified CSS
+ element reference identifier">specified CSS element reference
+ identifiers</span>, which are used in certain CSS features to
+ override the normal <span title="concept-id">ID</span>-based
+ mapping. <a href="#refsCSSIMAGES">[CSSIMAGES]</a></p>
+
+ <p>When a <code>Document</code> is created, it must be associated
+ with an initially-empty <dfn>CSS ID overrides list</dfn>, which
+ consists of a list of mappings each of which consists of a string
+ name mapped to an <code>Element</code> node.</p>
+
+ <p>Each entry in the <span>CSS ID overrides list</span>, while it is
+ in the list, defines a <span>specified CSS element reference
+ identifier</span> mapping the given name to the given
+ <code>Element</code>. <a href="#refsCSSIMAGES">[CSSIMAGES]</a></p>
+
+ <p>On getting, the <code
+ title="dom-document-cssElementMap">cssElementMap</code> IDL
+ attribute must return a <code>DOMElementMap</code> object,
+ associated with the following algorithms, which expose the current
+ mappings:</p>
+
+ <dl>
+
+ <dt>The algorithm for getting the list of name-element mappings</dt>
+
+ <dd>
+
+ <p>Return the <code>Document</code>'s <span>CSS ID overrides
+ list</span>, maintaining the order in which the entries were
+ originally added to the list.</p>
+
+ </dd>
+
+ <dt>The algorithm for for mapping a name to a certain element</dt>
+
+ <dd>
+
+ <p>Let <var title="">name</var> be the name passed to the
+ algorithm and <var title="">element</var> be the
+ <code>Element</code> passed to the algorithm.</p>
+
+ <p>If <var title="">element</var> is null, run the algorithm for
+ deleting mappings by name, passing it <var title="">name</var>.</p>
+
+ <p>Otherwise, if there is an entry in the <code>Document</code>'s
+ <span>CSS ID overrides list</span> whose name is <var
+ title="">name</var>, replace its current value with <var
+ title="">element</var>.</p>
+
+ <p>Otherwise, add a mapping to the <code>Document</code>'s
+ <span>CSS ID overrides list</span> whose name is <var
+ title="">name</var> and whose element is <var
+ title="">element</var>.</p>
+
+ </dd>
+
+ <dt>The algorithm for deleting mappings by name</dt>
+
+ <dd>
+
+ <p>If there is an entry in the <code>Document</code>'s <span>CSS
+ ID overrides list</span> whose name is the name passed to this
+ algorithm, remove it. This also undefines the <span>specified CSS
+ element reference identifier</span> for that name. <a
+ href="#refsCSSIMAGES">[CSSIMAGES]</a></p>
+
+ </dd>
+
+ </dl>
+
+ <p>The same object must be returned each time.</p>
+
+ </div>
+<!--START w3c-html--><!--CSSREF-->
+
+ <div class="impl">
+
<hr>
<p>The <code>HTMLDocument</code> interface <span title="support
@@ -106170,6 +106324,11 @@
<dd><cite><a href="http://www.w3.org/TR/css3-fonts/">CSS Fonts
Module Level 3</a></cite>, J. Daggett. W3C.</dd>
+ <dt id="refsCSSIMAGES">[CSSIMAGES]</dt>
+ <dd><cite><a href="http://dev.w3.org/csswg/css3-images/">CSS Image
+ Values and Replaced Content Module Level 3</a></cite>, E. Etemad,
+ T. Atkins. W3C.</dd>
+
<dt id="refsCSSOM">[CSSOM]</dt>
<dd><cite><a href="http://dev.w3.org/csswg/cssom/">Cascading Style Sheets
Object Model (CSSOM)</a></cite>, A. van Kesteren. W3C.</dd>
@@ -106187,7 +106346,8 @@
Interface Module</a></cite>, T. Çelik. W3C.</dd>
<dt id="refsCSSVALUES">[CSSVALUES]</dt>
- <dd><cite><a href="http://dev.w3.org/csswg/css3-values/">CSS3 Values and Units</a></cite>, H. Lie, C. Lilley. W3C.</dd>
+ <dd><cite><a href="http://dev.w3.org/csswg/css3-values/">CSS3
+ Values and Units</a></cite>, H. Lie, C. Lilley. W3C.</dd>
<dt id="refsDOM2HTML">[DOM2HTML]</dt>
<dd>(Non-normative) <cite><a
More information about the Commit-Watchers
mailing list