Skip to content

Commit

Permalink
removing extra callback param to the testProps methods. unncessary, i…
Browse files Browse the repository at this point in the history
…t turns out.
  • Loading branch information
paulirish committed May 22, 2011
1 parent 198c4ae commit 38e5101
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ window.Modernizr = (function( window, document, undefined ) {
* a certain property, it won't return undefined for it.
* A supported CSS property returns empty string when its not yet set.
*/
function testProps( props, callback, prefixed ) {
function testProps( props, prefixed ) {
for ( var i in props ) {
if ( mStyle[ props[i] ] !== undefined && (!callback || callback(props[i], modElem)) ) {
if ( mStyle[ props[i] ] !== undefined ) {
return prefixed == 'pfx' ? props[i] : true;
}
}
Expand All @@ -243,12 +243,12 @@ window.Modernizr = (function( window, document, undefined ) {
* the element including the non-vendor prefixed one, for forward-
* compatibility.
*/
function testPropsAll( prop, callback, prefixed ) {
function testPropsAll( prop, prefixed ) {

var ucProp = prop.charAt(0).toUpperCase() + prop.substr(1),
props = (prop + ' ' + domPrefixes.join(ucProp + ' ') + ucProp).split(' ');

return testProps(props, callback, prefixed);
return testProps(props, prefixed);
}

/**
Expand Down Expand Up @@ -523,9 +523,7 @@ window.Modernizr = (function( window, document, undefined ) {
// border-radius: http://muddledramblings.com/table-of-css3-border-radius-compliance

tests['borderradius'] = function() {
return testPropsAll('borderRadius', function( prop ) {
return contains( prop, 'orderRadius' );
});
return testPropsAll('borderRadius');
};

// WebOS unfortunately false positives on this test.
Expand Down Expand Up @@ -1049,7 +1047,7 @@ window.Modernizr = (function( window, document, undefined ) {
// str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-');

Modernizr.prefixed = function(prop){
return testPropsAll(prop, undefined, 'pfx');
return testPropsAll(prop, 'pfx');
}

// Remove "no-js" class from <html> element, if it exists:
Expand Down

0 comments on commit 38e5101

Please sign in to comment.