Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #61 from victor-homyakov/patch-17

Optimize the case when `Element.down` is called without any arguments.
  • Loading branch information...
commit 745bea66df4a8544b1f1645c1cd116e218e01974 2 parents 4577941 + 2dfb3ae
@savetheclocktower savetheclocktower authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  src/prototype/dom/dom.js
View
1  src/prototype/dom/dom.js
@@ -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))
Please sign in to comment.
Something went wrong with that request. Please try again.