diff options
author | xue <> | 2007-03-26 00:27:59 +0000 |
---|---|---|
committer | xue <> | 2007-03-26 00:27:59 +0000 |
commit | 0f00e85e311955b3f84dde559da6b5a2ab5c3cda (patch) | |
tree | ccb93c4e2d056c69209307fcb680fc23a9c57370 /tests/test_tools/selenium/core/scripts/find_matching_child.js | |
parent | cbee2945d1858f7f256b44a3fbfe816dc0202f4d (diff) |
merge from 3.0 branch till 1769.
Diffstat (limited to 'tests/test_tools/selenium/core/scripts/find_matching_child.js')
-rw-r--r-- | tests/test_tools/selenium/core/scripts/find_matching_child.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test_tools/selenium/core/scripts/find_matching_child.js b/tests/test_tools/selenium/core/scripts/find_matching_child.js index 197d1032..fbf35b75 100644 --- a/tests/test_tools/selenium/core/scripts/find_matching_child.js +++ b/tests/test_tools/selenium/core/scripts/find_matching_child.js @@ -15,8 +15,8 @@ * */ -Element.findMatchingChildren = function(element, selector) { - var matches = $A([]); +elementFindMatchingChildren = function(element, selector) { + var matches = []; var childCount = element.childNodes.length; for (var i=0; i<childCount; i++) { @@ -24,7 +24,7 @@ Element.findMatchingChildren = function(element, selector) { if (selector(child)) { matches.push(child); } else { - childMatches = Element.findMatchingChildren(child, selector); + childMatches = elementFindMatchingChildren(child, selector); matches.push(childMatches); } } @@ -34,7 +34,7 @@ Element.findMatchingChildren = function(element, selector) { ELEMENT_NODE_TYPE = 1; -Element.findFirstMatchingChild = function(element, selector) { +elementFindFirstMatchingChild = function(element, selector) { var childCount = element.childNodes.length; for (var i=0; i<childCount; i++) { @@ -43,7 +43,7 @@ Element.findFirstMatchingChild = function(element, selector) { if (selector(child)) { return child; } - result = Element.findFirstMatchingChild(child, selector); + result = elementFindFirstMatchingChild(child, selector); if (result) { return result; } @@ -52,7 +52,7 @@ Element.findFirstMatchingChild = function(element, selector) { return null; } -Element.findFirstMatchingParent = function(element, selector) { +elementFindFirstMatchingParent = function(element, selector) { var current = element.parentNode; while (current != null) { if (selector(current)) { @@ -63,7 +63,7 @@ Element.findFirstMatchingParent = function(element, selector) { return current; } -Element.findMatchingChildById = function(element, id) { - return Element.findFirstMatchingChild(element, function(element){return element.id==id} ); +elementFindMatchingChildById = function(element, id) { + return elementFindFirstMatchingChild(element, function(element){return element.id==id} ); } |