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
dc830728
Commit
dc830728
authored
Jul 07, 2012
by
David Benjamin
Committed by
Dave Methvin
Jul 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #11249. Inline styles anger Content Security Policy.
parent
c8e8d905
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
support.js
src/support.js
+6
-3
No files found.
src/support.js
View file @
dc830728
...
@@ -15,10 +15,11 @@ jQuery.support = (function() {
...
@@ -15,10 +15,11 @@ jQuery.support = (function() {
// Preliminary tests
// Preliminary tests
div
.
setAttribute
(
"className"
,
"t"
);
div
.
setAttribute
(
"className"
,
"t"
);
div
.
innerHTML
=
" <link/><table></table><a href='/a'
style='top:1px;float:left;opacity:.5;'
>a</a><input type='checkbox'/>"
;
div
.
innerHTML
=
" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"
;
all
=
div
.
getElementsByTagName
(
"*"
);
all
=
div
.
getElementsByTagName
(
"*"
);
a
=
div
.
getElementsByTagName
(
"a"
)[
0
];
a
=
div
.
getElementsByTagName
(
"a"
)[
0
];
a
.
style
.
cssText
=
"top:1px;float:left;opacity:.5"
;
// Can't get basic test support
// Can't get basic test support
if
(
!
all
||
!
all
.
length
||
!
a
)
{
if
(
!
all
||
!
all
.
length
||
!
a
)
{
...
@@ -196,8 +197,9 @@ jQuery.support = (function() {
...
@@ -196,8 +197,9 @@ jQuery.support = (function() {
// display:none (it is still safe to use offsets if a parent element is
// display:none (it is still safe to use offsets if a parent element is
// hidden; don safety goggles and see bug #4512 for more information).
// hidden; don safety goggles and see bug #4512 for more information).
// (only IE 8 fails this test)
// (only IE 8 fails this test)
div
.
innerHTML
=
"<table><tr><td
style='padding:0;margin:0;border:0;display:none'
></td><td>t</td></tr></table>"
;
div
.
innerHTML
=
"<table><tr><td></td><td>t</td></tr></table>"
;
tds
=
div
.
getElementsByTagName
(
"td"
);
tds
=
div
.
getElementsByTagName
(
"td"
);
tds
[
0
].
style
.
cssText
=
"padding:0;margin:0;border:0;display:none"
;
isSupported
=
(
tds
[
0
].
offsetHeight
===
0
);
isSupported
=
(
tds
[
0
].
offsetHeight
===
0
);
tds
[
0
].
style
.
display
=
""
;
tds
[
0
].
style
.
display
=
""
;
...
@@ -249,7 +251,8 @@ jQuery.support = (function() {
...
@@ -249,7 +251,8 @@ jQuery.support = (function() {
// (IE 6 does this)
// (IE 6 does this)
div
.
style
.
display
=
"block"
;
div
.
style
.
display
=
"block"
;
div
.
style
.
overflow
=
"visible"
;
div
.
style
.
overflow
=
"visible"
;
div
.
innerHTML
=
"<div style='width:5px;'></div>"
;
div
.
innerHTML
=
"<div></div>"
;
div
.
firstChild
.
style
.
width
=
"5px"
;
support
.
shrinkWrapBlocks
=
(
div
.
offsetWidth
!==
3
);
support
.
shrinkWrapBlocks
=
(
div
.
offsetWidth
!==
3
);
container
.
style
.
zoom
=
1
;
container
.
style
.
zoom
=
1
;
...
...
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