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
64902e03
Commit
64902e03
authored
Dec 30, 2010
by
jaubourg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:jquery/jquery into deferred
parents
7490eb4f
dfa57073
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
script.js
src/transports/script.js
+6
-7
No files found.
src/transports/script.js
View file @
64902e03
...
@@ -47,10 +47,9 @@ jQuery.ajax.transport("script", function(s) {
...
@@ -47,10 +47,9 @@ jQuery.ajax.transport("script", function(s) {
script
.
src
=
s
.
url
;
script
.
src
=
s
.
url
;
// Attach handlers for all browsers
// Attach handlers for all browsers
script
.
onload
=
script
.
onreadystatechange
=
function
(
statusText
)
{
script
.
onload
=
script
.
onreadystatechange
=
function
(
_
,
statusText
)
{
if
(
(
!
script
.
readyState
||
if
(
!
script
.
readyState
||
/loaded|complete/
.
test
(
script
.
readyState
)
)
{
script
.
readyState
===
"loaded"
||
script
.
readyState
===
"complete"
)
)
{
// Handle memory leak in IE
// Handle memory leak in IE
script
.
onload
=
script
.
onreadystatechange
=
null
;
script
.
onload
=
script
.
onreadystatechange
=
null
;
...
@@ -60,10 +59,10 @@ jQuery.ajax.transport("script", function(s) {
...
@@ -60,10 +59,10 @@ jQuery.ajax.transport("script", function(s) {
head
.
removeChild
(
script
);
head
.
removeChild
(
script
);
}
}
script
=
undefined
;
script
=
0
;
// Callback
& dereference
// Callback
callback
(
statusText
?
0
:
200
,
statusText
||
"success"
);
callback
(
statusText
?
0
:
200
,
statusText
||
"success"
);
}
}
};
};
// Use insertBefore instead of appendChild to circumvent an IE6 bug.
// Use insertBefore instead of appendChild to circumvent an IE6 bug.
...
@@ -73,7 +72,7 @@ jQuery.ajax.transport("script", function(s) {
...
@@ -73,7 +72,7 @@ jQuery.ajax.transport("script", function(s) {
abort
:
function
(
statusText
)
{
abort
:
function
(
statusText
)
{
if
(
script
)
{
if
(
script
)
{
script
.
onload
(
statusText
);
script
.
onload
(
0
,
statusText
);
}
}
}
}
};
};
...
...
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