Skip to content

Commit

Permalink
DaveHunt on behalf of DavidStark: Only use isSameNode function if ava…
Browse files Browse the repository at this point in the history
…ilable. Fixes issue 3770.

r17244
  • Loading branch information
davehunt committed Jun 21, 2012
1 parent af3e96b commit cb1b1c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascript/selenium-core/scripts/selenium-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ Selenium.prototype.doClick = function(locator) {
var d = elementWithHref.ownerDocument;
var html = d ? d.documentElement : null;
var curElem = elementWithHref;
while (curElem && html && !curElem.isSameNode(html)) {
while (curElem && html && (curElem.isSameNode ? !curElem.isSameNode(html) : curElem != html)) {
curElem = curElem.parentNode;
}
if (!html || !curElem) {
Expand Down

0 comments on commit cb1b1c9

Please sign in to comment.