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
94ee3e97
Commit
94ee3e97
authored
Apr 16, 2011
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache references to navigator and location. Fixes #6690.
parent
5b197b6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
ajax.js
src/ajax.js
+2
-2
intro.js
src/intro.js
+3
-1
No files found.
src/ajax.js
View file @
94ee3e97
...
@@ -45,9 +45,9 @@ var r20 = /%20/g,
...
@@ -45,9 +45,9 @@ var r20 = /%20/g,
ajaxLocParts
;
ajaxLocParts
;
// #8138, IE may throw an exception when accessing
// #8138, IE may throw an exception when accessing
// a field from
document
.location if document.domain has been set
// a field from
window
.location if document.domain has been set
try
{
try
{
ajaxLocation
=
document
.
location
.
href
;
ajaxLocation
=
location
.
href
;
}
catch
(
e
)
{
}
catch
(
e
)
{
// Use the href attribute of an A element
// Use the href attribute of an A element
// since IE will modify it given document.location
// since IE will modify it given document.location
...
...
src/intro.js
View file @
94ee3e97
...
@@ -16,4 +16,6 @@
...
@@ -16,4 +16,6 @@
(
function
(
window
,
undefined
)
{
(
function
(
window
,
undefined
)
{
// Use the correct document accordingly with window argument (sandbox)
// Use the correct document accordingly with window argument (sandbox)
var
document
=
window
.
document
;
var
document
=
window
.
document
,
navigator
=
window
.
navigator
,
location
=
window
.
location
;
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