Skip to content

Commit

Permalink
Make readable
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Dec 21, 2012
1 parent 7f4acb4 commit 8b889a4
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions js/id/util.js
Expand Up @@ -57,13 +57,19 @@ iD.util.qsString = function(obj) {
};

iD.util.prefixProperty = function(property) {
var prefixes = ['webkit', 'ms', 'Moz', 'O'];
return (function prefixMatch(p) { // via mbostock
var i = -1, n = p.length, s = document.body.style;
if (property.toLowerCase() in s) return property.toLowerCase();
while (++i < n) if (p[i] + property in s) return '-' + p[i].toLowerCase() + '-' + property.toLowerCase();
return false;
})(prefixes);
var prefixes = ['webkit', 'ms', 'Moz', 'O'],
i = -1,
n = prefixes.length,
s = document.body.style;

if (property.toLowerCase() in s)
return property.toLowerCase();

while (++i < n)
if (prefixes[i] + property in s)
return '-' + prefixes[i].toLowerCase() + '-' + property.toLowerCase();

return false;
};

iD.util.support3d = function() {
Expand Down

0 comments on commit 8b889a4

Please sign in to comment.