From d41ac85ca3773f1be5dd91d59060fc064ac22673 Mon Sep 17 00:00:00 2001 From: Oleg Date: Thu, 20 Dec 2012 21:06:06 +0400 Subject: [PATCH] Save one byte --- src/manipulation.js | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/manipulation.js b/src/manipulation.js index 79ef956ac..f24f1e9b1 100644 --- a/src/manipulation.js +++ b/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; -} -- 2.39.5