Monotone-Parent: a807a87708b05f4866dff41ca4ac7c75e9a98991

Monotone-Revision: 6d796bebf66ba67880bcd99d4b4acc55bac2e33f

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-05-05T22:30:06
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-05-05 22:30:06 +00:00
parent cdf7c18388
commit 897035cb0b
2 changed files with 24 additions and 21 deletions
+6 -4
View File
@@ -10,14 +10,16 @@ Element.addMethods({
childNodesWithTag: function(element, tagName) {
element = $(element);
var matchingNodes = new Array();
var tagName = tagName.toUpperCase();
for (var i = 0; i < element.childNodes.length; i++) {
if (typeof(element.childNodes[i]) == "object"
&& element.childNodes[i].tagName
&& element.childNodes[i].tagName.toUpperCase() == tagName)
matchingNodes.push(element.childNodes[i]);
var childNode = $(element.childNodes[i]);
if (Object.isElement(childNode)
&& childNode.tagName
&& childNode.tagName.toUpperCase() == tagName)
matchingNodes.push(childNode);
}
return matchingNodes;