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
14e9da51
Commit
14e9da51
authored
Feb 24, 2011
by
gnarf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A quick change to detect AIR urls
parent
58faec7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
ajax.js
src/ajax.js
+1
-1
ajax.js
test/unit/ajax.js
+12
-0
No files found.
src/ajax.js
View file @
14e9da51
...
@@ -19,7 +19,7 @@ var r20 = /%20/g,
...
@@ -19,7 +19,7 @@ var r20 = /%20/g,
rucHeadersFunc
=
function
(
_
,
$1
,
$2
)
{
rucHeadersFunc
=
function
(
_
,
$1
,
$2
)
{
return
$1
+
$2
.
toUpperCase
();
return
$1
+
$2
.
toUpperCase
();
},
},
rurl
=
/^
([\w\+\.\-]
+:
)
\/\/([^\/
?#:
]
*
)(?:
:
(\d
+
))?
/
,
rurl
=
/^
([\w\+\.\-]
+:
)
(?:\/\/([^\/
?#:
]
*
)(?:
:
(\d
+
))?
|
\/[^\/])
/
,
// Keep a copy of the old load method
// Keep a copy of the old load method
_load
=
jQuery
.
fn
.
load
,
_load
=
jQuery
.
fn
.
load
,
...
...
test/unit/ajax.js
View file @
14e9da51
...
@@ -2239,6 +2239,18 @@ test("jQuery.ajax - active counter", function() {
...
@@ -2239,6 +2239,18 @@ test("jQuery.ajax - active counter", function() {
ok
(
jQuery
.
active
==
0
,
"ajax active counter should be zero: "
+
jQuery
.
active
);
ok
(
jQuery
.
active
==
0
,
"ajax active counter should be zero: "
+
jQuery
.
active
);
});
});
test
(
"jQuery.ajax - compatible with AIR urls"
),
function
()
{
expect
(
1
);
stop
();
$
.
ajax
({
url
:
"app:/testing"
,
beforeSend
:
function
()
{
ok
(
this
.
crossDomain
,
"Detected crossDomain for AIR Url"
);
return
false
;
}
});
});
}
}
//}
//}
\ No newline at end of file
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