diff --git a/src/components/core.js b/src/components/core.js index d2075da..b70cd09 100644 --- a/src/components/core.js +++ b/src/components/core.js @@ -14,7 +14,7 @@ */ var pfx = (function () { var style = document.createElement('dummy').style, - prefixes = 'Webkit Moz O ms Khtml'.split(' '), + prefixes = ['Webkit', 'Moz', 'O', 'ms', 'Khtml', ''], memory = {}; return function ( prop ) { if ( typeof memory[ prop ] === "undefined" ) { @@ -41,6 +41,9 @@ } var index = 1 + name.substr(1).search(/[A-Z]/); var prefix = name.substr(0, index).toLowerCase(); + if(prefix === '') { + return name.toLowerCase(); + } var postfix = name.substr(index).toLowerCase(); return "-" + prefix + "-" + postfix; }