- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Sun, 08 Aug 2010 09:49:21 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/markup/js
In directory hutz:/tmp/cvs-serv30660/js
Modified Files:
dfn.js
Log Message:
further knob-turning of index and references sections
Index: dfn.js
===================================================================
RCS file: /sources/public/html5/markup/js/dfn.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- dfn.js 6 Aug 2010 23:33:27 -0000 1.7
+++ dfn.js 8 Aug 2010 09:49:19 -0000 1.8
@@ -99,7 +99,7 @@
n += 1;
var span = document.createElement('span');
span.appendChild(document.createTextNode('[' + n + ']'));
- span.setAttribute("class", "index-counter");
+ span.className = "index-counter";
a.appendChild(span);
lastLi.appendChild(document.createTextNode(' '));
lastLi.appendChild(a);
@@ -119,10 +119,9 @@
function dfnGetCaption(link) {
var node = link;
- while (node && (!node.getAttribute('class') || node.getAttribute('class').indexOf("section") == -1)) {
+ while (node && (!node.className || node.className.indexOf("section") == -1)) {
node = node.parentNode;
-// if (node.tagName == "DIV" && (node.getAttribute('class') == "section" || node.getAttribute('class') == "no-number elementpage section")) {
- if (node.tagName == "DIV" && (node.getAttribute('class') && node.getAttribute('class').indexOf("section") != -1)) {
+ if (node.tagName == "DIV" && (node.className && node.className.indexOf("section") != -1)) {
return node.childNodes[1];
}
}
Received on Sunday, 8 August 2010 09:49:22 UTC