W3C home > Mailing lists > Public > public-html-commits@w3.org > October 2009

html5/spec Overview.html,1.3288,1.3289

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 14 Oct 2009 11:24:15 +0000
To: public-html-commits@w3.org
Message-Id: <E1My1xn-0007Fz-DD@lionel-hutz.w3.org>
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv27784

Modified Files:
	Overview.html 
Log Message:
Microdata: Rename .content to .itemValue and make it more useful. (whatwg r4140)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.3288
retrieving revision 1.3289
diff -u -d -r1.3288 -r1.3289
--- Overview.html	14 Oct 2009 10:53:40 -0000	1.3288
+++ Overview.html	14 Oct 2009 11:24:12 -0000	1.3289
@@ -5435,7 +5435,7 @@
 typedef sequence&lt;any&gt; <dfn id="propertyvaluearray">PropertyValueArray</dfn>;
 
 interface <dfn id="propertynodelist">PropertyNodeList</dfn> : <span>NodeList</span> {
-  readonly attribute <a href="#propertyvaluearray">PropertyValueArray</a> <a href="#dom-propertynodelist-contents" title="dom-PropertyNodeList-contents">contents</a>;
+  readonly attribute <a href="#propertyvaluearray">PropertyValueArray</a> <a href="#dom-propertynodelist-values" title="dom-PropertyNodeList-values">values</a>;
 };</pre><dl class="domintro"><dt><var title="">collection</var> . <code title="dom-HTMLPropertyCollection-length"><a href="#dom-htmlpropertycollection-length">length</a></code></dt>
    <dd>
     <p>Returns the number of elements in the collection.</p>
@@ -5461,7 +5461,7 @@
     <p>Returns a <code><a href="#propertynodelist">PropertyNodeList</a></code> object containing any elements that add a property named <var title="">name</var>.</p>
    </dd>
 
-   <dt><var title="">propertyNodeList</var> . <code title="dom-PropertyNodeList-contents"><a href="#dom-propertynodelist-contents">contents</a></code></dt>
+   <dt><var title="">propertyNodeList</var> . <code title="dom-PropertyNodeList-values"><a href="#dom-propertynodelist-values">values</a></code></dt>
    <dd>
     <p>Returns an array of the various values that the relevant elements have.</p>
    </dd>
@@ -5507,12 +5507,11 @@
   from the <code>NodeList</code> interface must behave as they would
   on a <code>NodeList</code> object.</p>
 
-  <p>The <dfn id="dom-propertynodelist-contents" title="dom-PropertyNodeList-contents"><code>contents</code></dfn>
+  <p>The <dfn id="dom-propertynodelist-values" title="dom-PropertyNodeList-values"><code>values</code></dfn>
   IDL attribute on the <code><a href="#propertynodelist">PropertyNodeList</a></code> object, on
   getting, must return a newly constructed array whose values are the
-  values obtained from the <code title="dom-content"><a href="#dom-content">content</a></code>
-  DOM property of each of the elements represented by the object, in
-  <a href="#tree-order">tree order</a>.</p>
+  values obtained from the <code title="dom-itemValue"><a href="#dom-itemvalue">itemValue</a></code> DOM property of each of the
+  elements represented by the object, in <a href="#tree-order">tree order</a>.</p>
 
   </div><h4 id="domtokenlist-0"><span class="secno">2.7.3 </span>DOMTokenList</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><p>The <code><a href="#domtokenlist">DOMTokenList</a></code> interface represents an interface
   to an underlying string that consists of a <a href="#set-of-space-separated-tokens">set of
@@ -6830,7 +6829,7 @@
            attribute DOMString <a href="#dom-itemid" title="dom-itemId">itemId</a>;
   [PutForwards=<a href="#dom-domsettabletokenlist-value" title="dom-DOMSettableTokenList-value">value</a>] readonly attribute <a href="#domsettabletokenlist">DOMSettableTokenList</a> <a href="#dom-itemprop" title="dom-itemProp">itemProp</a>;
   readonly attribute <a href="#htmlpropertycollection">HTMLPropertyCollection</a> <a href="#dom-properties" title="dom-properties">properties</a>;
-           attribute DOMString <a href="#dom-content" title="dom-content">content</a>;
+           attribute any <a href="#dom-itemvalue" title="dom-itemValue">itemValue</a>;
 
   // <a href="#editing">user interaction</a>
            attribute boolean <a href="#dom-hidden" title="dom-hidden">hidden</a>;
@@ -9693,6 +9692,7 @@
 <pre class="idl">interface <dfn id="htmlmetaelement">HTMLMetaElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
            attribute DOMString <a href="#dom-meta-name" title="dom-meta-name">name</a>;
            attribute DOMString <a href="#dom-meta-httpequiv" title="dom-meta-httpEquiv">httpEquiv</a>;
+           attribute DOMString <a href="#dom-meta-content" title="dom-meta-content">content</a>;
 };</pre>
    </dd>
   </dl><p>The <code><a href="#meta">meta</a></code> element <a href="#represents">represents</a> various
@@ -9733,8 +9733,8 @@
   then the value part of the metadata name/value pair is the empty
   string.<div class="impl">
 
-  <p>The <dfn id="dom-meta-name" title="dom-meta-name"><code>name</code></dfn> IDL
-  attribute must <a href="#reflect">reflect</a> the content attribute of the
+  <p>The <dfn id="dom-meta-name" title="dom-meta-name"><code>name</code></dfn> and <dfn id="dom-meta-content" title="dom-meta-content"><code>content</code></dfn> IDL attributes
+  must <a href="#reflect">reflect</a> the respective content attributes of the
   same name. The IDL attribute <dfn id="dom-meta-httpequiv" title="dom-meta-httpEquiv"><code>httpEquiv</code></dfn> must
   <a href="#reflect">reflect</a> the content attribute <code title="attr-meta-http-equiv"><a href="#attr-meta-http-equiv">http-equiv</a></code>.</p>
 
@@ -39591,10 +39591,8 @@
   be enumerated to go through each element that adds one or more
   properties to the item. It can also be indexed by name, which will
   return an object with a list of the elements that add properties
-  with that name.<p>Each element that adds a property also has a <code title="dom-content"><a href="#dom-content">content</a></code> IDL attribute that returns its
-  value.
-
-  <div class="example">
+  with that name.<p>Each element that adds a property also has a <code title="dom-itemValue"><a href="#dom-itemvalue">itemValue</a></code> IDL attribute that returns
+  its value.<div class="example">
 
    <p>This sample gets the first item of type "net.example.user" and
    then pops up an alert using the "name" property from
@@ -39607,15 +39605,15 @@
   name in this way, actually returns a <code><a href="#propertynodelist">PropertyNodeList</a></code>
   object with all the matching properties. The
   <code><a href="#propertynodelist">PropertyNodeList</a></code> object can be used to obtained all the
-  values at once using <em>its</em> <code title="dom-PropertyNodeList-contents"><a href="#dom-propertynodelist-contents">contents</a></code> attribute,
-  which returns an array of all the values.<div class="example">
+  values at once using <em>its</em> <code title="dom-PropertyNodeList-values"><a href="#dom-propertynodelist-values">values</a></code> attribute, which
+  returns an array of all the values.<div class="example">
 
    <p>In an earlier example, a "org.example.animals.cat" item had two
    "com.example.color" values. This script looks up the first such
    item and then lists all its values.</p>
 
    <pre>var cat = document.getItems('org.example.animals.cat')[0];
-var colors = cat.properties['com.example.color'].contents;
+var colors = cat.properties['com.example.color'].values;
 var result;
 if (colors.length == 0) {
   result = 'Color unknown.';
@@ -39952,13 +39950,16 @@
 
    </dd>
 
-   <dt><var title="">element</var> . <code title="dom-content"><a href="#dom-content">content</a></code> [ = <var title="">value</var> ]</dt>
+   <dt><var title="">element</var> . <code title="dom-itemValue"><a href="#dom-itemvalue">itemValue</a></code> [ = <var title="">value</var> ]</dt>
 
    <dd>
 
     <p>Returns the element's <a href="#concept-property-value" title="concept-property-value">value</a>.</p>
 
-    <p>Can be set, to change the element's <a href="#concept-property-value" title="concept-property-value">value</a>.</p>
+    <p>Can be set, to change the element's <a href="#concept-property-value" title="concept-property-value">value</a>. Setting the <a href="#concept-property-value" title="concept-property-value">value</a> when the element has
+    no <code title="attr-itemprop"><a href="#names:-the-itemprop-attribute">itemprop</a></code> attribute or when
+    the element's value is an <a href="#concept-item" title="concept-item">item</a>
+    throws an <code><a href="#invalid_access_err">INVALID_ACCESS_ERR</a></code> exception.</p>
 
    </dd>
 
@@ -39990,10 +39991,23 @@
   on which the attribute was invoked, while that element is an <a href="#concept-item" title="concept-item">item</a>, and matches nothing the rest of
   the time.</p>
 
-  <p>The <dfn id="dom-content" title="dom-content"><code>content</code></dfn> IDL
+  <p>The <dfn id="dom-itemvalue" title="dom-itemValue"><code>itemValue</code></dfn> IDL
   attribute's behavior depends on the element, as follows:</p>
 
-  <dl><dt>If the element is a <code><a href="#meta">meta</a></code> element</dt>
+  <dl><dt>If the element has no <code title="attr-itemprop"><a href="#names:-the-itemprop-attribute">itemprop</a></code> attribute</dt>
+
+   <dd><p>The attribute must return null on getting and must throw an
+   <code><a href="#invalid_access_err">INVALID_ACCESS_ERR</a></code> exception on setting.</p>
+
+
+   <dt>If the element has an <code title="attr-itemscope"><a href="#attr-itemscope">itemscope</a></code> attribute</dt>
+
+   <dd><p>The attribute must return the element itself on getting and
+   must throw an <code><a href="#invalid_access_err">INVALID_ACCESS_ERR</a></code> exception on
+   setting.</p>
+
+
+   <dt>If the element is a <code><a href="#meta">meta</a></code> element</dt>
 
    <dd><p>The attribute must act as it would if it was <a href="#reflect" title="reflect">reflecting</a> the element's <code title="attr-meta-content"><a href="#attr-meta-content">content</a></code> content
    attribute.</dd>
@@ -40027,7 +40041,14 @@
    <dd><p>The attribute must act the same as the element's
    <code>textContent</code> attribute.</dd>
 
-  </dl></div><div class="impl">
+  </dl><p>When the <code title="dom-itemValue"><a href="#dom-itemvalue">itemValue</a></code> IDL
+  attribute is <a href="#reflect" title="reflect">reflecting</a> a content
+  attribute or acting like the element's <code>textContent</code>
+  attribute, the user agent must, on setting, convert the new value to
+  the IDL <code title="">DOMString</code> value before using it
+  according to the mappings described above.</p>
+
+  </div><div class="impl">
 
   <h3 id="converting-html-to-other-formats"><span class="secno">5.4 </span>Converting HTML to other formats</h3>
 
Received on Wednesday, 14 October 2009 11:24:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 14 October 2009 11:24:17 GMT