mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Save one byte
This commit is contained in:
parent
3c1b42805d
commit
d41ac85ca3
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user