Fixed #1039 and #1733 by going through the core API and making them text node and comment node safe.
This commit is contained in:
parent
12ef255ffd
commit
ffbedf0262
8 changed files with 188 additions and 64 deletions
|
@ -96,9 +96,9 @@ jQuery.extend({
|
|||
if ( typeof t != "string" )
|
||||
return [ t ];
|
||||
|
||||
// Make sure that the context is a DOM Element
|
||||
if ( context && !context.nodeType )
|
||||
context = null;
|
||||
// check to make sure context is a DOM element or a document
|
||||
if ( context && context.nodeType != 1 && context.nodeType != 9)
|
||||
return [ ];
|
||||
|
||||
// Set the correct context (if none is provided)
|
||||
context = context || document;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue