Skip to content

Commit

Permalink
[e] (0) markup errors
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@3085 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed May 11, 2009
1 parent cc4c3e0 commit 4d505aa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
23 changes: 19 additions & 4 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -40957,9 +40957,13 @@ if (!colors) {
result = 'Color unknown.';
} else if (colors instanceof PropertyNodeList) {
result = 'Colors:';
for (var i = 0; i
for (var i = 0; i < colors.content.length; i += 1)
result += ' ' + colors.content[i];
} else {
result = 'Color: ' + colors.content;
}</pre>

</pre></div>
</div>

<p>It's also possible to get a list of all the <a href=#property-names>property
names</a> using the object's <code title=dom-HTMLPropertyCollection-names><a href=#dom-htmlpropertycollection-names>names</a></code> DOM
Expand All @@ -40972,7 +40976,18 @@ if (!colors) {
item./p&gt;

<pre>var outer = document.createElement('ul');
for (var item = 0; item
for (var item = 0; item &lt; document.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) {
var propLi = document.createElement('li');
propLi.appendChild(document.createTextNode(document.items[item].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>

Expand All @@ -40987,7 +41002,7 @@ for (var item = 0; item

<p>...it would result in the following output:</p>

</pre><ul><li>
<ul><li>
<ul><li>org.example.name</li>
<li>com.example.fn</li>
<li>org.example.desc</li>
Expand Down
6 changes: 3 additions & 3 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -46202,7 +46202,7 @@ if (!colors) {
result = 'Color unknown.';
} else if (colors instanceof PropertyNodeList) {
result = 'Colors:';
for (var i = 0; i < colors.content.length; i += 1)
for (var i = 0; i &lt; colors.content.length; i += 1)
result += ' ' + colors.content[i];
} else {
result = 'Color: ' + colors.content;
Expand All @@ -46222,10 +46222,10 @@ if (!colors) {
item./p>

<pre>var outer = document.createElement('ul');
for (var item = 0; item < document.items.length; item += 1) {
for (var item = 0; item &lt; document.items.length; item += 1) {
var itemLi = document.createElement('li');
var inner = document.createElement('ul');
for (var name = 0; name < document.items[item].names.length; name += 1) {
for (var name = 0; name &lt; document.items[item].names.length; name += 1) {
var propLi = document.createElement('li');
propLi.appendChild(document.createTextNode(document.items[item].names[name]));
inner.appendChild(propLi);
Expand Down

0 comments on commit 4d505aa

Please sign in to comment.