Anonymous avatar Anonymous committed 972de58

No ticket: reduce support.js

Comments (0)

Files changed (1)

-jQuery.support = (function() {
+jQuery.support = (function( support ) {
 
-	var support, a, select, opt, input, fragment,
+	var a, select, opt, input, fragment,
 		div = document.createElement("div");
 
+	// Finish early in limited (non-browser) environments
 	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 ];
 	if ( !a ) {
-		return {};
+		return support;
 	}
 
 	// First batch of tests
 	input = div.getElementsByTagName("input")[ 0 ];
 
 	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
-		// Support: IE9, IE10
-		optSelected: opt.selected,
+	// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
+	support.checkOn = !!input.value;
+
+	// 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
-		boxModel: document.compatMode === "CSS1Compat",
+	// jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
+	support.boxModel = document.compatMode === "CSS1Compat";
 
-		// Will be defined later
-		reliableMarginRight: true,
-		boxSizingReliable: true,
-		pixelPosition: false
-	};
+	// Will be defined later
+	support.reliableMarginRight = true;
+	support.boxSizingReliable = true;
+	support.pixelPosition = false;
 
 	// Make sure checked status is properly cloned
 	input.checked = true;
 	select = fragment = opt = a = input = null;
 
 	return support;
-})();
+})({});
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.