[html5] r4600 - [e] (0) Examples for itemProp and itemRef.
whatwg at whatwg.org
whatwg at whatwg.org
Sun Jan 17 00:23:36 PST 2010
Author: ianh
Date: 2010-01-17 00:23:34 -0800 (Sun, 17 Jan 2010)
New Revision: 4600
Modified:
complete.html
index
source
Log:
[e] (0) Examples for itemProp and itemRef.
Modified: complete.html
===================================================================
--- complete.html 2010-01-17 08:02:54 UTC (rev 4599)
+++ complete.html 2010-01-17 08:23:34 UTC (rev 4600)
@@ -45908,9 +45908,31 @@
</div>
+ <div class=exmaple>
+ <p>In this example, a script checks to see if a particular element
+ <var title="">element</var> is declaring a particular property, and
+ if it is, it increments a counter:</p>
+ <pre>if (element.itemProp.contains('color'))
+ count += 1;</pre>
+ </div>
+
+ <div class=exmaple>
+
+ <p>This script iterates over each of the values of an element's
+ <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute, calling a
+ function for each referenced element:</p>
+
+ <pre>for (var index = 0; index < element.itemRef.length; index += 1)
+ process(document.getElementById(element.itemRef[index]));</pre>
+
+ </div>
+
+
+
+
<h3 id=mdvocabs><span class=secno>5.4 </span>Microdata vocabularies</h3>
Modified: index
===================================================================
--- index 2010-01-17 08:02:54 UTC (rev 4599)
+++ index 2010-01-17 08:23:34 UTC (rev 4600)
@@ -45808,9 +45808,31 @@
</div>
+ <div class=exmaple>
+ <p>In this example, a script checks to see if a particular element
+ <var title="">element</var> is declaring a particular property, and
+ if it is, it increments a counter:</p>
+ <pre>if (element.itemProp.contains('color'))
+ count += 1;</pre>
+ </div>
+
+ <div class=exmaple>
+
+ <p>This script iterates over each of the values of an element's
+ <code title=attr-itemref><a href=#attr-itemref>itemref</a></code> attribute, calling a
+ function for each referenced element:</p>
+
+ <pre>for (var index = 0; index < element.itemRef.length; index += 1)
+ process(document.getElementById(element.itemRef[index]));</pre>
+
+ </div>
+
+
+
+
<h3 id=mdvocabs><span class=secno>5.4 </span>Microdata vocabularies</h3>
Modified: source
===================================================================
--- source 2010-01-17 08:02:54 UTC (rev 4599)
+++ source 2010-01-17 08:23:34 UTC (rev 4600)
@@ -51202,8 +51202,30 @@
</div>
+ <div class="exmaple">
+ <p>In this example, a script checks to see if a particular element
+ <var title="">element</var> is declaring a particular property, and
+ if it is, it increments a counter:</p>
+ <pre>if (element.itemProp.contains('color'))
+ count += 1;</pre>
+
+ </div>
+
+ <div class="exmaple">
+
+ <p>This script iterates over each of the values of an element's
+ <code title="attr-itemref">itemref</code> attribute, calling a
+ function for each referenced element:</p>
+
+ <pre>for (var index = 0; index < element.itemRef.length; index += 1)
+ process(document.getElementById(element.itemRef[index]));</pre>
+
+ </div>
+
+
+
<!--END complete--><!--END html-->
<h3>Other changes to HTML5</h3>
More information about the Commit-Watchers
mailing list