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
0a2f93e6
Commit
0a2f93e6
authored
May 18, 2012
by
Mike Sherov
Committed by
Dave Methvin
May 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inline the boxModel test, and correct unit test. Closes gh-781.
parent
d12e9b28
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
support.js
src/support.js
+3
-3
support.js
test/unit/support.js
+5
-1
No files found.
src/support.js
View file @
0a2f93e6
...
@@ -82,6 +82,9 @@ jQuery.support = (function() {
...
@@ -82,6 +82,9 @@ jQuery.support = (function() {
// Where outerHTML is undefined, this still works
// Where outerHTML is undefined, this still works
html5Clone
:
document
.
createElement
(
"nav"
).
cloneNode
(
true
).
outerHTML
!==
"<:nav></:nav>"
,
html5Clone
:
document
.
createElement
(
"nav"
).
cloneNode
(
true
).
outerHTML
!==
"<:nav></:nav>"
,
// jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
boxModel
:
(
document
.
compatMode
===
"CSS1Compat"
),
// Will be defined later
// Will be defined later
submitBubbles
:
true
,
submitBubbles
:
true
,
changeBubbles
:
true
,
changeBubbles
:
true
,
...
@@ -95,9 +98,6 @@ jQuery.support = (function() {
...
@@ -95,9 +98,6 @@ jQuery.support = (function() {
boxSizingReliable
:
true
boxSizingReliable
:
true
};
};
// jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
support
.
boxModel
=
(
document
.
compatMode
===
"CSS1Compat"
);
// Make sure checked status is properly cloned
// Make sure checked status is properly cloned
input
.
checked
=
true
;
input
.
checked
=
true
;
support
.
noCloneChecked
=
input
.
cloneNode
(
true
).
checked
;
support
.
noCloneChecked
=
input
.
cloneNode
(
true
).
checked
;
...
...
test/unit/support.js
View file @
0a2f93e6
module
(
"support"
,
{
teardown
:
moduleTeardown
});
module
(
"support"
,
{
teardown
:
moduleTeardown
});
ok
(
jQuery
.
support
.
boxModel
,
"jQuery.support.boxModel is perpetually true since 1.8"
);
test
(
"boxModel"
,
function
()
{
expect
(
1
);
equal
(
jQuery
.
support
.
boxModel
,
document
.
compatMode
===
"CSS1Compat"
,
"jQuery.support.boxModel is sort of tied to quirks mode but unstable since 1.8"
);
});
testIframeWithCallback
(
"body background is not lost if set prior to loading jQuery (#9238)"
,
"support/bodyBackground"
,
function
(
color
,
support
)
{
testIframeWithCallback
(
"body background is not lost if set prior to loading jQuery (#9238)"
,
"support/bodyBackground"
,
function
(
color
,
support
)
{
expect
(
2
);
expect
(
2
);
...
...
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