Skip to content

Commit

Permalink
tweaks to make IE6 happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Jun 14, 2010
1 parent 3c46f21 commit 1cad475
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,18 +656,18 @@ window.Modernizr = (function(window,doc,undefined){

// thanks to Erik Dahlstrom
tests[svg] = function(){
return doc.createElementNS && !!doc.createElementNS( "http://www.w3.org/2000/svg", "svg").createSVGRect;
return !!doc.createElementNS && !!doc.createElementNS( "http://www.w3.org/2000/svg", "svg").createSVGRect;
};

// thanks to F1lt3r and lucideer
// http://github.com/Modernizr/Modernizr/issues#issue/35
tests[smil] = function(){
return doc.createElementNS && /SVG/.test(tostring.call(doc.createElementNS('http://www.w3.org/2000/svg','animate')));
return !!doc.createElementNS && /SVG/.test(tostring.call(doc.createElementNS('http://www.w3.org/2000/svg','animate')));
};

tests[svgclippaths] = function(){
// returns a false positive in saf 3.2?
return doc.createElementNS && /SVG/.test(tostring.call(doc.createElementNS('http://www.w3.org/2000/svg','clipPath')));
return !!doc.createElementNS && /SVG/.test(tostring.call(doc.createElementNS('http://www.w3.org/2000/svg','clipPath')));
};


Expand Down
2 changes: 1 addition & 1 deletion test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
function getMembers(thing){
var things = [];
for (var x in thing){
if (thing.hasOwnProperty(x)){
if (thing.hasOwnProperty && thing.hasOwnProperty(x)){
things.push(x);
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test("globals set up",2, function() {
- ($.inArray('onhashchange',remainingGlobals) > -1 && $.inArray('onhashchange',remainingGlobals) == -1 &&
'onhashchange' in window && !window.onhashchange ? 1 : 0);

equals( count , 1 , 'no more than one global object created');
ok( ! (count > 1) , 'no more than one global object created');

/* * /
var arr = [];
Expand All @@ -51,7 +51,7 @@ test("no-js class is gone.", function() {
equals(document.documentElement.className.indexOf('no-js') , -1,
'no-js is gone.');

ok(document.documentElement.className.indexOf(' js ') > -1,
ok(/\bjs /.test(document.documentElement.className),
'html.js class is present')

if (document.querySelector){
Expand Down

0 comments on commit 1cad475

Please sign in to comment.