mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix #11249. Inline styles anger Content Security Policy.
This commit is contained in:
parent
c8e8d905f8
commit
dc83072878
@ -15,10 +15,11 @@ jQuery.support = (function() {
|
||||
|
||||
// Preliminary tests
|
||||
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("*");
|
||||
a = div.getElementsByTagName("a")[ 0 ];
|
||||
a.style.cssText = "top:1px;float:left;opacity:.5";
|
||||
|
||||
// Can't get basic test support
|
||||
if ( !all || !all.length || !a ) {
|
||||
@ -196,8 +197,9 @@ jQuery.support = (function() {
|
||||
// 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).
|
||||
// (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[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
|
||||
isSupported = ( tds[ 0 ].offsetHeight === 0 );
|
||||
|
||||
tds[ 0 ].style.display = "";
|
||||
@ -249,7 +251,8 @@ jQuery.support = (function() {
|
||||
// (IE 6 does this)
|
||||
div.style.display = "block";
|
||||
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 );
|
||||
|
||||
container.style.zoom = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user