2013-08-15 18:15:49 +00:00
|
|
|
define([
|
|
|
|
"./core",
|
|
|
|
"./var/strundefined",
|
2013-09-02 17:21:09 +00:00
|
|
|
"./var/support",
|
2013-09-10 00:13:01 +00:00
|
|
|
"./core/init", // Needed for hasOwn support test
|
2013-08-16 00:38:48 +00:00
|
|
|
// This is listed as a dependency for build order, but it's still optional in builds
|
|
|
|
"./core/ready"
|
2013-09-02 17:21:09 +00:00
|
|
|
], function( jQuery, strundefined, support ) {
|
2013-08-15 18:15:49 +00:00
|
|
|
|
2013-09-10 00:13:01 +00:00
|
|
|
// Support: IE<9
|
|
|
|
// Iteration over object's inherited properties before its own
|
|
|
|
var i;
|
|
|
|
for ( i in jQuery( support ) ) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
support.ownLast = i !== "0";
|
|
|
|
|
2013-09-02 17:21:09 +00:00
|
|
|
// Note: most support tests are defined in their respective modules.
|
2011-04-07 04:51:37 +00:00
|
|
|
|
2013-09-02 17:21:09 +00:00
|
|
|
jQuery(function() {
|
|
|
|
// We need to execute this one support test ASAP because we need to know
|
|
|
|
// if body.style.zoom needs to be set.
|
2011-04-07 04:51:37 +00:00
|
|
|
|
2013-09-02 17:21:09 +00:00
|
|
|
var container,
|
|
|
|
div = document.createElement( "div" ),
|
|
|
|
divReset =
|
|
|
|
"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;" +
|
|
|
|
"display:block;padding:0;margin:0;border:0",
|
|
|
|
body = document.getElementsByTagName("body")[0];
|
2011-09-01 15:16:38 +00:00
|
|
|
|
2013-09-02 17:21:09 +00:00
|
|
|
if ( !body ) {
|
|
|
|
// Return for frameset docs that don't have a body
|
|
|
|
return;
|
2008-12-21 23:06:42 +00:00
|
|
|
}
|
|
|
|
|
2013-09-02 17:21:09 +00:00
|
|
|
// Setup
|
|
|
|
div.setAttribute( "className", "t" );
|
|
|
|
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
|
2011-10-22 20:03:57 +00:00
|
|
|
|
2013-09-02 17:21:09 +00:00
|
|
|
container = document.createElement( "div" );
|
|
|
|
container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
|
2011-11-08 05:05:33 +00:00
|
|
|
|
2013-09-02 17:21:09 +00:00
|
|
|
body.appendChild( container ).appendChild( div );
|
2012-05-18 16:40:10 +00:00
|
|
|
|
2013-09-02 17:21:09 +00:00
|
|
|
// Will be changed later if needed.
|
2013-02-25 21:06:09 +00:00
|
|
|
support.inlineBlockNeedsLayout = false;
|
2012-12-17 14:17:39 +00:00
|
|
|
|
2013-09-02 17:21:09 +00:00
|
|
|
if ( typeof div.style.zoom !== strundefined ) {
|
|
|
|
// Support: IE<8
|
|
|
|
// Check if natively block-level elements act like inline-block
|
|
|
|
// elements when setting their display to 'inline' and giving
|
|
|
|
// them layout
|
2012-06-11 17:24:26 +00:00
|
|
|
div.innerHTML = "";
|
2013-09-02 17:21:09 +00:00
|
|
|
div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
|
|
|
|
support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
|
2012-02-13 14:52:43 +00:00
|
|
|
|
2013-09-02 17:21:09 +00:00
|
|
|
if ( support.inlineBlockNeedsLayout ) {
|
|
|
|
// Prevent IE 6 from affecting layout for positioned elements #11048
|
|
|
|
// Prevent IE from shrinking the body in IE 7 mode #12869
|
2012-12-17 14:17:39 +00:00
|
|
|
// Support: IE<8
|
2013-09-02 17:21:09 +00:00
|
|
|
body.style.zoom = 1;
|
2011-12-26 20:22:29 +00:00
|
|
|
}
|
2013-09-02 17:21:09 +00:00
|
|
|
}
|
2011-12-26 20:22:29 +00:00
|
|
|
|
2013-09-02 17:21:09 +00:00
|
|
|
body.removeChild( container );
|
2011-09-20 01:03:41 +00:00
|
|
|
|
2012-06-11 17:24:26 +00:00
|
|
|
// Null elements to avoid leaks in IE
|
2013-09-02 17:21:09 +00:00
|
|
|
container = div = null;
|
|
|
|
});
|
2012-12-17 14:17:39 +00:00
|
|
|
|
2013-08-15 18:15:49 +00:00
|
|
|
});
|