aboutsummaryrefslogtreecommitdiffstats
path: root/src/support.js
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-04-11 13:41:17 +0200
committerjaubourg <j@ubourg.net>2011-04-11 13:41:17 +0200
commit4c3aba9a15c936696ad2e799f7e372bf2aeb38a5 (patch)
treebe25f30c1eb60aa2b87412b51eab7745b2005760 /src/support.js
parent3411d47a6a952e283864d2401438a6764d925b74 (diff)
parent56ffad2dad138293c132e6ad353111bd2d1f1239 (diff)
downloadjquery-4c3aba9a15c936696ad2e799f7e372bf2aeb38a5.tar.gz
jquery-4c3aba9a15c936696ad2e799f7e372bf2aeb38a5.zip
Merge branch 'master' of github.com:jquery/jquery
Diffstat (limited to 'src/support.js')
-rw-r--r--src/support.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/support.js b/src/support.js
index 50ae6dfd7..34960505a 100644
--- a/src/support.js
+++ b/src/support.js
@@ -19,7 +19,8 @@ jQuery.support = (function() {
isSupported;
// Preliminary tests
- div.innerHTML = " <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+ div.setAttribute("className", "t");
+ div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
all = div.getElementsByTagName( "*" );
a = div.getElementsByTagName( "a" )[ 0 ];
@@ -48,7 +49,7 @@ jQuery.support = (function() {
// Get the style information from getAttribute
// (IE uses .cssText instead)
- style: /red/.test( a.getAttribute("style") ),
+ style: /top/.test( a.getAttribute("style") ),
// Make sure that URLs aren't manipulated
// (IE normalizes it by default)
@@ -71,6 +72,13 @@ jQuery.support = (function() {
// Make sure that a selected-by-default option has a working selected property.
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
optSelected: opt.selected,
+
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+ getSetAttribute: div.className !== "t",
+
+ // Test for presence of native Function#bind.
+ // Not in: >= Chrome 6, >= FireFox 3, Safari 5?, IE 9?, Opera 11?
+ nativeBind: jQuery.isFunction( Function.prototype.bind ),
// Will be defined later
submitBubbles: true,