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
a69fbbaa
Commit
a69fbbaa
authored
Jun 29, 2012
by
Mike Sherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stop using reserved words as argument names
parent
304eebb2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
26 deletions
+26
-26
core.js
src/core.js
+23
-23
queue.js
src/queue.js
+3
-3
No files found.
src/core.js
View file @
a69fbbaa
...
...
@@ -538,21 +538,21 @@ jQuery.extend({
},
// args is for internal usage only
each
:
function
(
obj
ect
,
callback
,
args
)
{
each
:
function
(
obj
,
callback
,
args
)
{
var
name
,
i
=
0
,
length
=
obj
ect
.
length
,
isObj
=
length
===
undefined
||
jQuery
.
isFunction
(
obj
ect
);
length
=
obj
.
length
,
isObj
=
length
===
undefined
||
jQuery
.
isFunction
(
obj
);
if
(
args
)
{
if
(
isObj
)
{
for
(
name
in
obj
ect
)
{
if
(
callback
.
apply
(
obj
ect
[
name
],
args
)
===
false
)
{
for
(
name
in
obj
)
{
if
(
callback
.
apply
(
obj
[
name
],
args
)
===
false
)
{
break
;
}
}
}
else
{
for
(
;
i
<
length
;
)
{
if
(
callback
.
apply
(
obj
ect
[
i
++
],
args
)
===
false
)
{
if
(
callback
.
apply
(
obj
[
i
++
],
args
)
===
false
)
{
break
;
}
}
...
...
@@ -561,21 +561,21 @@ jQuery.extend({
// A special, fast, case for the most common use of each
}
else
{
if
(
isObj
)
{
for
(
name
in
obj
ect
)
{
if
(
callback
.
call
(
obj
ect
[
name
],
name
,
object
[
name
]
)
===
false
)
{
for
(
name
in
obj
)
{
if
(
callback
.
call
(
obj
[
name
],
name
,
obj
[
name
]
)
===
false
)
{
break
;
}
}
}
else
{
for
(
;
i
<
length
;
)
{
if
(
callback
.
call
(
obj
ect
[
i
],
i
,
object
[
i
++
]
)
===
false
)
{
if
(
callback
.
call
(
obj
[
i
],
i
,
obj
[
i
++
]
)
===
false
)
{
break
;
}
}
}
}
return
obj
ect
;
return
obj
;
},
// Use native String.trim function wherever possible
...
...
@@ -594,38 +594,38 @@ jQuery.extend({
},
// results is for internal usage only
makeArray
:
function
(
arr
ay
,
results
)
{
makeArray
:
function
(
arr
,
results
)
{
var
ret
=
results
||
[];
if
(
arr
ay
!=
null
)
{
if
(
arr
!=
null
)
{
// The window, strings (and functions) also have 'length'
// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
var
type
=
jQuery
.
type
(
arr
ay
);
var
type
=
jQuery
.
type
(
arr
);
if
(
arr
ay
.
length
==
null
||
type
===
"string"
||
type
===
"function"
||
type
===
"regexp"
||
jQuery
.
isWindow
(
array
)
)
{
core_push
.
call
(
ret
,
arr
ay
);
if
(
arr
.
length
==
null
||
type
===
"string"
||
type
===
"function"
||
type
===
"regexp"
||
jQuery
.
isWindow
(
arr
)
)
{
core_push
.
call
(
ret
,
arr
);
}
else
{
jQuery
.
merge
(
ret
,
arr
ay
);
jQuery
.
merge
(
ret
,
arr
);
}
}
return
ret
;
},
inArray
:
function
(
elem
,
arr
ay
,
i
)
{
inArray
:
function
(
elem
,
arr
,
i
)
{
var
len
;
if
(
arr
ay
)
{
if
(
arr
)
{
if
(
core_indexOf
)
{
return
core_indexOf
.
call
(
arr
ay
,
elem
,
i
);
return
core_indexOf
.
call
(
arr
,
elem
,
i
);
}
len
=
arr
ay
.
length
;
len
=
arr
.
length
;
i
=
i
?
i
<
0
?
Math
.
max
(
0
,
len
+
i
)
:
i
:
0
;
for
(
;
i
<
len
;
i
++
)
{
// Skip accessing in sparse arrays
if
(
i
in
arr
ay
&&
array
[
i
]
===
elem
)
{
if
(
i
in
arr
&&
arr
[
i
]
===
elem
)
{
return
i
;
}
}
...
...
@@ -812,7 +812,7 @@ jQuery.extend({
}
});
jQuery
.
ready
.
promise
=
function
(
obj
ect
)
{
jQuery
.
ready
.
promise
=
function
(
obj
)
{
if
(
!
readyList
)
{
readyList
=
jQuery
.
Deferred
();
...
...
@@ -866,7 +866,7 @@ jQuery.ready.promise = function( object ) {
}
}
}
return
readyList
.
promise
(
obj
ect
);
return
readyList
.
promise
(
obj
);
};
// Populate the class2type map
...
...
src/queue.js
View file @
a69fbbaa
...
...
@@ -112,7 +112,7 @@ jQuery.fn.extend({
},
// Get a promise resolved when queues of a certain type
// are emptied (fx is the type by default)
promise
:
function
(
type
,
obj
ect
)
{
promise
:
function
(
type
,
obj
)
{
var
tmp
,
count
=
1
,
defer
=
jQuery
.
Deferred
(),
...
...
@@ -125,7 +125,7 @@ jQuery.fn.extend({
};
if
(
typeof
type
!==
"string"
)
{
obj
ect
=
type
;
obj
=
type
;
type
=
undefined
;
}
type
=
type
||
"fx"
;
...
...
@@ -137,6 +137,6 @@ jQuery.fn.extend({
}
}
resolve
();
return
defer
.
promise
(
obj
ect
);
return
defer
.
promise
(
obj
);
}
});
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