MCPcopy
hub / github.com/Modernizr/Modernizr / prefixedCSSValue

Function prefixedCSSValue

src/prefixedCSSValue.js:23–45  ·  view source on GitHub ↗
(prop, value)

Source from the content-addressed store, hash-verified

21 * ```
22 */
23 var prefixedCSSValue = function(prop, value) {
24 var result = false;
25 var elem = createElement('div');
26 var style = elem.style;
27
28 if (prop in style) {
29 var i = domPrefixes.length;
30
31 style[prop] = value;
32 result = style[prop];
33
34 while (i-- && !result) {
35 style[prop] = '-' + domPrefixes[i] + '-' + value;
36 result = style[prop];
37 }
38 }
39
40 if (result === '') {
41 result = false;
42 }
43
44 return result;
45 };
46
47 ModernizrProto.prefixedCSSValue = prefixedCSSValue;
48 return prefixedCSSValue;

Callers 1

Calls 1

createElementFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…