Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

inline support test for saving bytes, and correct unit test from @dmethvin #781

Closed
wants to merge 1 commit into from

2 participants

@mikesherov
Collaborator
Running "compare_size:files" (compare_size) task
Sizes - compared to master
    251640        (-7)  dist/jquery.js                                         
     92891        (-2)  dist/jquery.min.js                                     
     33270        (-3)  dist/jquery.min.js.gz  
@dmethvin dmethvin closed this in 0a2f93e
@dmethvin
Owner

Strange, I was getting an error because the check for boxModel was outside of a test. So I put it in one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 18, 2012
  1. @mikesherov
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +3 −3 src/support.js
  2. +1 −1  test/unit/support.js
View
6 src/support.js
@@ -82,6 +82,9 @@ jQuery.support = (function() {
// Where outerHTML is undefined, this still works
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
submitBubbles: true,
changeBubbles: true,
@@ -95,9 +98,6 @@ jQuery.support = (function() {
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
input.checked = true;
support.noCloneChecked = input.cloneNode( true ).checked;
View
2  test/unit/support.js
@@ -1,6 +1,6 @@
module("support", { teardown: moduleTeardown });
-ok( jQuery.support.boxModel, "jQuery.support.boxModel is perpetually true since 1.8" );
+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 ) {
expect( 2 );
Something went wrong with that request. Please try again.