m. Resolving firefox bug with innerText that MichaelC noticed today.
authorJames Craig <jcraig@apple.com>
Thu, 14 Nov 2013 01:42:45 -0800
changeset 160 0e16441c95a1
parent 159 006d3714a3c8
child 161 356bed431f91
m. Resolving firefox bug with innerText that MichaelC noticed today.
src/js/respec-transformers.js
--- a/src/js/respec-transformers.js	Tue Nov 12 14:00:50 2013 -0800
+++ b/src/js/respec-transformers.js	Thu Nov 14 01:42:45 2013 -0800
@@ -3,7 +3,7 @@
 function events() {
 	var eventList = [], nodeList = $$('code.event');
 	for (var i=0; i<nodeList.length; i++) {
-		var title = nodeList[i].innerText;
+		var title = nodeList[i].innerText || nodeList[i].textContent;
 		if ($$('#'+title).length) eventList.push(title);
 	}
 	return eventList.sort();
@@ -16,7 +16,7 @@
 		var title = eventList[i];
 		var description = '';
 		var els = $$('#'+title+'+dd>p'); // get the paragraph children of the dd that follows the dt event element.
-		if (els.length) description = els[0].innerText; // use its text value as the short description
+		if (els.length) description = els[0].innerText || els[0].textContent; // use its text value as the short description
 		s += '<li><a href="#' +title+ '">' +title+ '</a>: ' +description+ '</li>';
 	}
 	s += '</ul>';