Permalink
Browse files

[giow] (0) Microdata: Rename .content to .itemValue and make it more …

…useful.

git-svn-id: http://svn.whatwg.org/webapps@4140 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent 01c0d23 commit 50b0643596133e7d2f36b5f2c46a067d9dfd1d6d @Hixie Hixie committed Oct 14, 2009
Showing with 131 additions and 59 deletions.
  1. +43 −20 complete.html
  2. +42 −19 index
  3. +44 −18 source
  4. +2 −2 vocabs-index
View
63 complete.html
@@ -6166,7 +6166,7 @@ <h5 id=htmlpropertycollection-0><span class=secno>2.7.2.5 </span>HTMLPropertyCol
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>
@@ -6194,7 +6194,7 @@ <h5 id=htmlpropertycollection-0><span class=secno>2.7.2.5 </span>HTMLPropertyCol
<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>
@@ -6240,12 +6240,11 @@ <h5 id=htmlpropertycollection-0><span class=secno>2.7.2.5 </span>HTMLPropertyCol
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>
@@ -7726,7 +7725,7 @@ <h4 id=elements-in-the-dom><span class=secno>3.2.2 </span>Elements in the DOM</h
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>;
@@ -11080,6 +11079,7 @@ <h4 id=meta><span class=secno>4.2.5 </span>The <dfn><code>meta</code></dfn> elem
<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
@@ -11138,8 +11138,8 @@ <h4 id=meta><span class=secno>4.2.5 </span>The <dfn><code>meta</code></dfn> elem
<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>
@@ -44453,8 +44453,8 @@ <h4 id=using-the-microdata-dom-api><span class=secno>5.1.6 </span>Using the micr
return an object with a list of the elements that add properties
with that name.</p>
- <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.
+ <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.</p>
<div class=example>
@@ -44471,8 +44471,8 @@ <h4 id=using-the-microdata-dom-api><span class=secno>5.1.6 </span>Using the micr
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.</p>
+ 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.</p>
<div class=example>
@@ -44481,7 +44481,7 @@ <h4 id=using-the-microdata-dom-api><span class=secno>5.1.6 </span>Using the micr
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.';
@@ -44910,13 +44910,16 @@ <h3 id=microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</h3>
</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>
@@ -44948,10 +44951,23 @@ <h3 id=microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</h3>
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>
@@ -44985,7 +45001,14 @@ <h3 id=microdata-dom-api><span class=secno>5.3 </span>Microdata DOM API</h3>
<dd><p>The attribute must act the same as the element's
<code>textContent</code> attribute.</dd>
- </dl></div>
+ </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>
@@ -47498,7 +47521,7 @@ <h5 id=examples-2><span class=secno>5.4.2.2 </span>Examples</h5>
calendar += 'UID:' + node.itemId + '\r\n';
for (var propIndex = 0; propIndex &lt; node.properties.length; propIndex += 1) {
var prop = node.properties[propIndex];
- var value = prop.contents;
+ var value = prop.itemValue;
var parameters = '';
if (prop.localName == 'time') {
value = value.replace(/[:-]/g, '');
View
61 index
@@ -5995,7 +5995,7 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
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>
@@ -6023,7 +6023,7 @@ interface <dfn id=propertynodelist>PropertyNodeList</dfn> : <span>NodeList</span
<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>
@@ -6069,12 +6069,11 @@ interface <dfn id=propertynodelist>PropertyNodeList</dfn> : <span>NodeList</span
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>
@@ -7555,7 +7554,7 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {
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>;
@@ -10909,6 +10908,7 @@ gave me some of the songs they wrote. I love sharing my music.&lt;/p&gt;
<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
@@ -10967,8 +10967,8 @@ gave me some of the songs they wrote. I love sharing my music.&lt;/p&gt;
<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>
@@ -44282,8 +44282,8 @@ contradict people?
return an object with a list of the elements that add properties
with that name.</p>
- <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.
+ <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.</p>
<div class=example>
@@ -44300,8 +44300,8 @@ alert('Hello ' + user.properties['name'][0].content + '!');</pre>
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.</p>
+ 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.</p>
<div class=example>
@@ -44310,7 +44310,7 @@ alert('Hello ' + user.properties['name'][0].content + '!');</pre>
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.';
@@ -44739,13 +44739,16 @@ document.body.appendChild(outer);</pre>
</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>
@@ -44777,10 +44780,23 @@ document.body.appendChild(outer);</pre>
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>
@@ -44814,7 +44830,14 @@ document.body.appendChild(outer);</pre>
<dd><p>The attribute must act the same as the element's
<code>textContent</code> attribute.</dd>
- </dl></div>
+ </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>
View
62 source
@@ -5838,7 +5838,7 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
typedef sequence&lt;any> <dfn>PropertyValueArray</dfn>;
interface <dfn>PropertyNodeList</dfn> : <span>NodeList</span> {
- readonly attribute <span>PropertyValueArray</span> <span title="dom-PropertyNodeList-contents">contents</span>;
+ readonly attribute <span>PropertyValueArray</span> <span title="dom-PropertyNodeList-values">values</span>;
};</pre>
<dl class="domintro">
@@ -5868,7 +5868,7 @@ interface <dfn>PropertyNodeList</dfn> : <span>NodeList</span> {
<p>Returns a <code>PropertyNodeList</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">contents</code></dt>
+ <dt><var title="">propertyNodeList</var> . <code title="dom-PropertyNodeList-values">values</code></dt>
<dd>
<p>Returns an array of the various values that the relevant elements have.</p>
</dd>
@@ -5929,12 +5929,12 @@ interface <dfn>PropertyNodeList</dfn> : <span>NodeList</span> {
on a <code>NodeList</code> object.</p>
<p>The <dfn
- title="dom-PropertyNodeList-contents"><code>contents</code></dfn>
+ title="dom-PropertyNodeList-values"><code>values</code></dfn>
IDL attribute on the <code>PropertyNodeList</code> object, on
getting, must return a newly constructed array whose values are the
- values obtained from the <code title="dom-content">content</code>
- DOM property of each of the elements represented by the object, in
- <span>tree order</span>.</p>
+ values obtained from the <code
+ title="dom-itemValue">itemValue</code> DOM property of each of the
+ elements represented by the object, in <span>tree order</span>.</p>
</div>
@@ -7639,7 +7639,7 @@ interface <dfn>HTMLDocument</dfn> {
attribute DOMString <span title="dom-itemId">itemId</span>;
[PutForwards=<span title="dom-DOMSettableTokenList-value">value</span>] readonly attribute <span>DOMSettableTokenList</span> <span title="dom-itemProp">itemProp</span>;
readonly attribute <span>HTMLPropertyCollection</span> <span title="dom-properties">properties</span>;
- attribute DOMString <span title="dom-content">content</span>;
+ attribute any <span title="dom-itemValue">itemValue</span>;
// <span>user interaction</span>
attribute boolean <span title="dom-hidden">hidden</span>;
@@ -11454,6 +11454,7 @@ gave me some of the songs they wrote. I love sharing my music.&lt;/p>
<pre class="idl">interface <dfn>HTMLMetaElement</dfn> : <span>HTMLElement</span> {
attribute DOMString <span title="dom-meta-name">name</span>;
attribute DOMString <span title="dom-meta-httpEquiv">httpEquiv</span>;
+ attribute DOMString <span title="dom-meta-content">content</span>;
};</pre>
</dd>
</dl>
@@ -11523,8 +11524,9 @@ gave me some of the songs they wrote. I love sharing my music.&lt;/p>
<div class="impl">
- <p>The <dfn title="dom-meta-name"><code>name</code></dfn> IDL
- attribute must <span>reflect</span> the content attribute of the
+ <p>The <dfn title="dom-meta-name"><code>name</code></dfn> and <dfn
+ title="dom-meta-content"><code>content</code></dfn> IDL attributes
+ must <span>reflect</span> the respective content attributes of the
same name. The IDL attribute <dfn
title="dom-meta-httpEquiv"><code>httpEquiv</code></dfn> must
<span>reflect</span> the content attribute <code
@@ -49468,8 +49470,8 @@ contradict people?
with that name.</p>
<p>Each element that adds a property also has a <code
- title="dom-content">content</code> IDL attribute that returns its
- value.
+ title="dom-itemValue">itemValue</code> IDL attribute that returns
+ its value.</p>
<div class="example">
@@ -49487,8 +49489,8 @@ alert('Hello ' + user.properties['name'][0].content + '!');</pre>
object with all the matching properties. The
<code>PropertyNodeList</code> object can be used to obtained all the
values at once using <em>its</em> <code
- title="dom-PropertyNodeList-contents">contents</code> attribute,
- which returns an array of all the values.</p>
+ title="dom-PropertyNodeList-values">values</code> attribute, which
+ returns an array of all the values.</p>
<div class="example">
@@ -49497,7 +49499,7 @@ alert('Hello ' + user.properties['name'][0].content + '!');</pre>
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.';
@@ -50008,15 +50010,19 @@ document.body.appendChild(outer);</pre>
</dd>
- <dt><var title="">element</var> . <code title="dom-content">content</code> [ = <var title="">value</var> ]</dt>
+ <dt><var title="">element</var> . <code title="dom-itemValue">itemValue</code> [ = <var title="">value</var> ]</dt>
<dd>
<p>Returns the element's <span
title="concept-property-value">value</span>.</p>
<p>Can be set, to change the element's <span
- title="concept-property-value">value</span>.</p>
+ title="concept-property-value">value</span>. Setting the <span
+ title="concept-property-value">value</span> when the element has
+ no <code title="attr-itemprop">itemprop</code> attribute or when
+ the element's value is an <span title="concept-item">item</span>
+ throws an <code>INVALID_ACCESS_ERR</code> exception.</p>
</dd>
@@ -50057,11 +50063,24 @@ document.body.appendChild(outer);</pre>
title="concept-item">item</span>, and matches nothing the rest of
the time.</p>
- <p>The <dfn title="dom-content"><code>content</code></dfn> IDL
+ <p>The <dfn title="dom-itemValue"><code>itemValue</code></dfn> IDL
attribute's behavior depends on the element, as follows:</p>
<dl>
+ <dt>If the element has no <code title="attr-itemprop">itemprop</code> attribute</dt>
+
+ <dd><p>The attribute must return null on getting and must throw an
+ <code>INVALID_ACCESS_ERR</code> exception on setting.</p>
+
+
+ <dt>If the element has an <code title="attr-itemscope">itemscope</code> attribute</dt>
+
+ <dd><p>The attribute must return the element itself on getting and
+ must throw an <code>INVALID_ACCESS_ERR</code> exception on
+ setting.</p>
+
+
<dt>If the element is a <code>meta</code> element</dt>
<dd><p>The attribute must act as it would if it was <span
@@ -50109,6 +50128,13 @@ document.body.appendChild(outer);</pre>
</dl>
+ <p>When the <code title="dom-itemValue">itemValue</code> IDL
+ attribute is <span title="reflect">reflecting</span> 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>
@@ -53313,7 +53339,7 @@ END:VCARD</pre>
calendar += 'UID:' + node.itemId + '\r\n';
for (var propIndex = 0; propIndex &lt; node.properties.length; propIndex += 1) {
var prop = node.properties[propIndex];
- var value = prop.contents;
+ var value = prop.itemValue;
var parameters = '';
if (prop.localName == 'time') {
value = value.replace(/[:-]/g, '');
View
4 vocabs-index
@@ -47,7 +47,7 @@
<header class="head"><p><a class="logo" href="http://www.whatwg.org/" rel="home"><img alt="WHATWG" src="/images/logo"></a></p>
<hgroup><h1>Microdata Vocabularies: vCard, vEvent, and works</h1>
- <h2 class="no-num no-toc">Draft Standard &mdash; 9 October 2009</h2>
+ <h2 class="no-num no-toc">Draft Standard &mdash; 14 October 2009</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>
<dl><dt>This specification:</dt>
<dd><a href="http://www.whatwg.org/specs/web-apps/current-work/">http://www.whatwg.org/specs/web-apps/current-work/</a></dd>
@@ -2627,7 +2627,7 @@ END:VCARD</pre>
calendar += 'UID:' + node.itemId + '\r\n';
for (var propIndex = 0; propIndex &lt; node.properties.length; propIndex += 1) {
var prop = node.properties[propIndex];
- var value = prop.contents;
+ var value = prop.itemValue;
var parameters = '';
if (prop.localName == 'time') {
value = value.replace(/[:-]/g, '');

0 comments on commit 50b0643

Please sign in to comment.