Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
8d3c0506
Commit
8d3c0506
authored
May 06, 2013
by
Timmy Willison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check nodeType of elements passed to selector-native's find. Fixes #13577.
parent
6d04ebfa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
selector-native.js
src/selector-native.js
+11
-1
sizzle
src/sizzle
+1
-1
No files found.
src/selector-native.js
View file @
8d3c0506
...
@@ -62,12 +62,22 @@ var selector_hasDuplicate,
...
@@ -62,12 +62,22 @@ var selector_hasDuplicate,
jQuery
.
extend
({
jQuery
.
extend
({
find
:
function
(
selector
,
context
,
results
,
seed
)
{
find
:
function
(
selector
,
context
,
results
,
seed
)
{
var
elem
,
var
elem
,
nodeType
,
i
=
0
;
i
=
0
;
results
=
results
||
[];
results
=
results
||
[];
context
=
context
||
document
;
context
=
context
||
document
;
// Same basic safeguard as Sizzle
if
(
!
selector
||
typeof
selector
!==
"string"
)
{
return
results
;
}
// Early return if context is not an element or document
if
(
(
nodeType
=
context
.
nodeType
)
!==
1
&&
nodeType
!==
9
)
{
return
[];
}
if
(
seed
)
{
if
(
seed
)
{
while
(
(
elem
=
seed
[
i
++
])
)
{
while
(
(
elem
=
seed
[
i
++
])
)
{
if
(
jQuery
.
find
.
matchesSelector
(
elem
,
selector
)
)
{
if
(
jQuery
.
find
.
matchesSelector
(
elem
,
selector
)
)
{
...
...
sizzle
@
853c2725
Subproject commit
b8789b87f1ecb00f0de82b2a13a3474dabdab406
Subproject commit
853c272575c692b39d4f9ea10f3f808696d1a574
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment