Skip to content

Commit

Permalink
Merge pull request #61 from victor-homyakov/patch-17
Browse files Browse the repository at this point in the history
Optimize the case when `Element.down` is called without any arguments.
  • Loading branch information
savetheclocktower committed Sep 1, 2012
2 parents 4577941 + 2dfb3ae commit 745bea6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/prototype/dom/dom.js
Expand Up @@ -1775,6 +1775,7 @@
* // -> undefined
**/
function down(element, expression, index) {
if (arguments.length === 1) return firstDescendant(element);
element = $(element), expression = expression || 0, index = index || 0;

if (Object.isNumber(expression))
Expand Down

0 comments on commit 745bea6

Please sign in to comment.