Browse files

[e] (0) Fix scripted examples for microdata

git-svn-id: http://svn.whatwg.org/webapps@4141 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent 50b0643 commit ce1170fbaffee8b034aa660a27203541b1dfbe66 @Hixie Hixie committed Oct 14, 2009
Showing with 12 additions and 9 deletions.
  1. +4 −3 complete.html
  2. +4 −3 index
  3. +4 −3 source
View
7 complete.html
@@ -44506,12 +44506,13 @@ <h4 id=using-the-microdata-dom-api><span class=secno>5.1.6 </span>Using the micr
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);
View
7 index
@@ -44335,12 +44335,13 @@ if (colors.length == 0) {
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);
View
7 source
@@ -49525,12 +49525,13 @@ if (colors.length == 0) {
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);

0 comments on commit ce1170f

Please sign in to comment.