mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Manipulation: Tolerate XMLNode host object input to getAll
Fixes #15151
Ref 25712d77c3
Closes gh-1602
This commit is contained in:
parent
609adf63da
commit
1ae025e24f
@ -121,8 +121,12 @@ function cloneCopyEvent( src, dest ) {
|
||||
}
|
||||
|
||||
function getAll( context, tag ) {
|
||||
var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :
|
||||
context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :
|
||||
// Support: IE9-11+
|
||||
// Use typeof to avoid zero-argument method invocation on host objects (#15151)
|
||||
var ret = typeof context.getElementsByTagName !== "undefined" ?
|
||||
context.getElementsByTagName( tag || "*" ) :
|
||||
typeof context.querySelectorAll !== "undefined" ?
|
||||
context.querySelectorAll( tag || "*" ) :
|
||||
[];
|
||||
|
||||
return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
|
||||
|
Loading…
Reference in New Issue
Block a user