mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-13 12:25:08 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user