html5/md Overview.html,1.14,1.15

Update of /sources/public/html5/md
In directory hutz:/tmp/cvs-serv17442

Modified Files:
	Overview.html 
Log Message:
Examples for itemProp and itemRef. (whatwg r4600)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/md/Overview.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- Overview.html	17 Jan 2010 08:01:07 -0000	1.14
+++ Overview.html	17 Jan 2010 08:23:38 -0000	1.15
@@ -1335,6 +1335,24 @@
   the IDL <code title="">DOMString</code> value before using it
   according to the mappings described above.</p>
 
+  </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 &lt; element.itemRef.length; index += 1)
+  process(document.getElementById(element.itemRef[index]));</pre>
+
   </div><h2 id="other-changes-to-html5"><span class="secno">6 </span>Other changes to HTML5</h2><h3 id="content-models"><span class="secno">6.1 </span>Content models</h3><p>If the <code title="attr-itemprop"><a href="#names:-the-itemprop-attribute">itemprop</a></code> attribute is
   present on <code>link</code> or <code>meta</code>, they are
   <span>flow content</span> and <span>phrasing content</span>. The

Received on Sunday, 17 January 2010 08:23:42 UTC