Skip to content
Permalink
Browse files

Save one byte

  • Loading branch information
markelog committed Dec 20, 2012
1 parent 3c1b428 commit d41ac85ca3773f1be5dd91d59060fc064ac22673
Showing with 20 additions and 20 deletions.
  1. +20 −20 src/manipulation.js
@@ -592,6 +592,26 @@ function cloneCopyEvent( src, dest ) {
}
}

function getAll( context, tag ) {
var elems, elem,
i = 0,
ret = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( tag || "*" ) :
typeof context.querySelectorAll !== "undefined" ? context.querySelectorAll( tag || "*" ) :
undefined;

if ( !ret ) {
for ( ret = [], elems = context.childNodes || context; (elem = elems[ i ]) != null; i++ ) {
core_push.apply( ret, !tag || jQuery.nodeName( elem, tag ) ?
getAll( elem, tag ) :
elems );
}
}

return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
jQuery.merge( [ context ], ret ) :
ret;
}

function fixCloneNodeIssues( src, dest ) {
var nodeName;

@@ -625,23 +645,3 @@ function fixCloneNodeIssues( src, dest ) {
dest.defaultValue = src.defaultValue;
}
}

function getAll( context, tag ) {
var elems, elem,
i = 0,
ret = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( tag || "*" ) :
typeof context.querySelectorAll !== "undefined" ? context.querySelectorAll( tag || "*" ) :
undefined;

if ( !ret ) {
for ( ret = [], elems = context.childNodes || context; (elem = elems[ i ]) != null; i++ ) {
core_push.apply( ret, !tag || jQuery.nodeName( elem, tag ) ?
getAll( elem, tag ) :
elems );
}
}

return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
jQuery.merge( [ context ], ret ) :
ret;
}

0 comments on commit d41ac85

Please sign in to comment.
You can’t perform that action at this time.