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
972de589
Commit
972de589
authored
Feb 25, 2013
by
Richard Gibson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No ticket: reduce support.js
parent
6256c614
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
19 deletions
+17
-19
support.js
src/support.js
+17
-19
No files found.
src/support.js
View file @
972de589
jQuery
.
support
=
(
function
()
{
jQuery
.
support
=
(
function
(
support
)
{
var
support
,
a
,
select
,
opt
,
input
,
fragment
,
var
a
,
select
,
opt
,
input
,
fragment
,
div
=
document
.
createElement
(
"div"
);
div
=
document
.
createElement
(
"div"
);
// Finish early in limited (non-browser) environments
div
.
innerHTML
=
"<a>a</a><input type='checkbox'/>"
;
div
.
innerHTML
=
"<a>a</a><input type='checkbox'/>"
;
// Support tests won't run in some limited or non-browser environments
a
=
div
.
getElementsByTagName
(
"a"
)[
0
];
a
=
div
.
getElementsByTagName
(
"a"
)[
0
];
if
(
!
a
)
{
if
(
!
a
)
{
return
{}
;
return
support
;
}
}
// First batch of tests
// First batch of tests
...
@@ -17,22 +16,21 @@ jQuery.support = (function() {
...
@@ -17,22 +16,21 @@ jQuery.support = (function() {
input
=
div
.
getElementsByTagName
(
"input"
)[
0
];
input
=
div
.
getElementsByTagName
(
"input"
)[
0
];
a
.
style
.
cssText
=
"float:left;opacity:.5"
;
a
.
style
.
cssText
=
"float:left;opacity:.5"
;
support
=
{
// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
checkOn
:
!!
input
.
value
,
// Must access the parent to make an option select properly
// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
// Support: IE9, IE10
support
.
checkOn
=
!!
input
.
value
;
optSelected
:
opt
.
selected
,
// Must access the parent to make an option select properly
// Support: IE9, IE10
support
.
optSelected
=
opt
.
selected
;
// jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
// jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
boxModel
:
document
.
compatMode
===
"CSS1Compat"
,
support
.
boxModel
=
document
.
compatMode
===
"CSS1Compat"
;
// Will be defined later
// Will be defined later
reliableMarginRight
:
true
,
support
.
reliableMarginRight
=
true
;
boxSizingReliable
:
true
,
support
.
boxSizingReliable
=
true
;
pixelPosition
:
false
support
.
pixelPosition
=
false
;
};
// Make sure checked status is properly cloned
// Make sure checked status is properly cloned
input
.
checked
=
true
;
input
.
checked
=
true
;
...
@@ -117,5 +115,5 @@ jQuery.support = (function() {
...
@@ -117,5 +115,5 @@ jQuery.support = (function() {
select
=
fragment
=
opt
=
a
=
input
=
null
;
select
=
fragment
=
opt
=
a
=
input
=
null
;
return
support
;
return
support
;
})();
})(
{}
);
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