Permalink
Browse files

Manipulation: Tolerate XMLNode host object input to getAll

Fixes #15151
Ref 25712d7
Closes gh-1602
  • Loading branch information...
gibson042 committed Jun 17, 2014
1 parent 609adf6 commit 1ae025e24f9920d18cec8a8498bfc4eed7e3f1dc
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/manipulation.js
View
@@ -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 ) ?

0 comments on commit 1ae025e

Please sign in to comment.