HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
4141Fix scripted examples for microdata2009-10-14 12:01
@@ -49518,26 +49518,27 @@ if (colors.length == 0) {
   title="dom-HTMLPropertyCollection-names">names</code> IDL
   attribute.</p>
 
   <div class="example">
 
    <p>This example creates a big list with a nested list for each item
    on the page, each with of all the property names used in that
    item.</p>
 
    <pre>var outer = document.createElement('ul');
-for (var item = 0; item &lt; document.items.length; item += 1) {
+var items = document.getItems();
+for (var item = 0; item &lt; items.length; item += 1) {
   var itemLi = document.createElement('li');
   var inner = document.createElement('ul');
-  for (var name = 0; name &lt; document.items[item].names.length; name += 1) {
+  for (var name = 0; name &lt; items[item].properties.names.length; name += 1) {
     var propLi = document.createElement('li');
-    propLi.appendChild(document.createTextNode(document.items[item].names[name]));
+    propLi.appendChild(document.createTextNode(items[item].properties.names[name]));
     inner.appendChild(propLi);
   }
   itemLi.appendChild(inner);
   outer.appendChild(itemLi);
 }
 document.body.appendChild(outer);</pre>
 
    <p>If faced with the following from an earlier example:</p>
 
    <pre>&lt;section itemscope item="org.example.animal.cat">

|